Forum Replies Created

Page 25 of 57
  • Hi,

    Parul could you explain your code.

    Thanks.

  • shariq

    Member
    September 20, 2018 at 7:28 PM in reply to: Access Camera in Salesforce1

    Hi,

    You can search on  app exchange, I think there is a feature regarding it.

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 7:26 PM in reply to: Can I Display list records in Debug Log?

    Hi,

    You can also save the debug in any custom text area field then view it from there.

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 7:25 PM in reply to: Can I Display list records in Debug Log?

    Hi,

    Debug in loop to show the list values in log

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 7:24 PM in reply to: How to pass special characters in URL?

    Hi,

    Just Encode using standard EncodingUtil class of salesforce to do it.

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 7:22 PM in reply to: Log a case from Sandbox?

    Hi,

    You can only log a case using production org.

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 7:22 PM in reply to: Can we use external storage to store attachments in Salesforce?

    Hi,

    Yes you can do it but it must be authenticated by salesforce.

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 7:21 PM in reply to: How to map JSON string with Salesforce object?

    Hi,

    You can also use Wrapper class for it.

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 7:20 PM in reply to: How to map JSON string with Salesforce object?

    Hi,

    Try this -

    ABC obj = (ABC)JSON.deserialize(responseBody, ABC.class)

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 7:18 PM in reply to: Facing error on preview a VF page.

    Hi,

    Put console.log for debugging and see how much is your code running.

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 7:17 PM in reply to: Facing error on preview a VF page.

    Hi,

    Could you share your code so that I can find some solution regarding  it.

    Thanks.

    • This reply was modified 7 years, 6 months ago by  shariq.
  • shariq

    Member
    September 20, 2018 at 7:16 PM in reply to: Grouping records in a report on Visualforce page

    Hi,

    I found this onlne -

    <apex:page controller="DisplaySectionsController" action="{!load}" sidebar="false"> <apex:sectionHeader title="My Sample Display Page" subtitle="Group by States" description="This page shows how you can dynamically group results by field value."/> <apex:repeat value="{!states}" var="state"> <apex:pageBlock title="{!state}"> <apex:repeat value="{!accounts}" var="account"> <apex:outputPanel rendered="{!IF(state=account.BillingState,true,false)}"> {!account.Name} - {!account.BillingState}<br/> </apex:outputPanel> </apex:repeat> </apex:pageBlock> </apex:repeat> </apex:page>

    public with sharing class DisplaySectionsController { public List<Account> accounts {get;set;} public String[] states {get;set;} public void load() { // for demo purposes limit the states accounts = [Select ID, Name, BillingState From Account Where BillingState IN ('CA','NY','FL')]; // dynamically create set of unique states from query Set<String> stateSet = new Set<String>(); for (Account a : accounts) stateSet.add(a.BillingState); // convert the set into a string array states = new String[stateSet.size()]; Integer i = 0; for (String state : stateSet) { states[i] = state; i++; } } }

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 7:11 PM in reply to: When bulk API is enabled what can be the limitations in dataloader?

    Hi,

    You can refer to salesforce governor limits

    Hope this helps

  • shariq

    Member
    September 20, 2018 at 7:10 PM in reply to: How to pass JavaScript variable value to Apex Controller?

    Hi,

    You can use apex param.

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 7:09 PM in reply to: How to upload file using Salesforce Mobile SDK for Android?

    Hi,

    You can try salesforce app present at ap[p exchange.

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 7:07 PM in reply to: How to disable the Opening Sequence in Salesforce Lightning?

    Hi,

    You need to talk to salesforce support for it, but I think We can't disable it.

  • shariq

    Member
    September 20, 2018 at 7:07 PM in reply to: Getting Uncommitted work pending Error in my Test class

    Hi,

    Just call DML and webservice class in different transaction.

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 7:00 PM in reply to: How to add error message in a Salesforce Apex Trigger?

    Hi,

    Try this -

    obj.addError(‘error’);

    Hope this helps.

  • Hi,

    apex:page controller="WrapperOpp" >
    <apex:form >
    <apex:pageBlock >
    <apex:pageBlockSection >
    <apex:selectList value="{!SelectedValue}" size="1">
    <apex:selectOptions value="{!Accs}"/>
    <apex:actionSupport event="onchange" action="{!refresh}" reRender="OppTable, CtcTable"/>
    </apex:selectList>
    <apex:pageBlockTable value="{!Opplist}" id="OppTable" var="o">
    <apex:column value="{!o.opp.Name}"/>
    </apex:pageBlockTable>
    <apex:pageBlockTable value="{!ctclist}" id="CtcTable" var="con">
    <apex:column value="{!con.c.Name}"/>
    </apex:pageBlockTable>
    </apex:pageBlockSection>
    </apex:pageBlock>
    </apex:form>
    </apex:page>

    public class WrapperOpp {

    public List<OppWrapper> Opplist = new List<OppWrapper>();
    public List<ContactWrapper> ctclist = new List<ContactWrapper>();
    public String SelectedValue { get; set; }

    public List<SelectOption> Accs {
    get{
    List<SelectOption> AccName = new List<SelectOption>();
    for(Account a :[Select Id, name from Account limit 10]){
    AccName.add(new SelectOption(a.name,a.name));
    }
    return AccName;
    }
    }
    public PageReference refresh(){
    Opplist .clear();
    for(Account a :[Select id,name,(Select name from opportunities), (Select FirstName from contacts) from Account where name =:SelectedValue]){
    for (opportunity opp :a.opportunities) Opplist.add(new OppWrapper(false,opp));
    for (Contact c : a.contacts) ctclist.add(new ContactWrapper(false,c));
    }
    return null;
    }

    public List<OppWrapper> getOppList(){
    System.debug('count'+Opplist.size());
    return Opplist;
    }

    public List<OppWrapper> getCtcList(){
    System.debug('count'+ctcList.size());
    return ctcList;
    }

    public class OppWrapper{
    public Boolean selected { get; set; }
    public Opportunity opp { get; set; }
    public OppWrapper(Boolean selected1, Opportunity opp1){
    selected = selected1;
    opp = opp1;
    }
    }

    public class ContactWrapper{
    public Boolean selected { get; set; }
    public Contact c { get; set; }

    public ContactWrapper(Boolean selected, Contact c){
    this.selected = selected;
    this.c = c;
    }
    }
    }

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 6:57 PM in reply to: How to prevent a user from creating a new account in Salesforce?

    Hi,

    There are various methods to do it, but best is to do it without any coding.

    Just remove the permission of create from Account sobject on the profile of that user.

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 6:55 PM in reply to: How to Salesforce Trigger on Event Object?

    Hi,

    Could you share your code so I can give some solution regarding it.

    Hope this helps.

  • Hi,

    This what I found online -

    About Rich Text Editor
    At a high-level, the buttons in RTE are organized into four groupings: “format text”, “format body”, “insert content”, and “clear formatting”.

    The “clear formatting” button always stays at the end of the buttons set, regardless of which rich text editor variant is used. It should always stand by itself.

    On smaller screen sizes, the select dropdowns for Font and Size in the toolbar can overlap outside of the container. To adjust the widths of the dropdowns, apply the class slds-region_narrow to the outermost div of the rich text editor.

    A label may be used to further describe the purpose of a Rich Text Editor. To add a label, place a <span> element with the class slds-form-element__label, right before the slds-form-element__control element.

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 6:50 PM in reply to: How to Salesforce Trigger on Event Object?

    Hi,

    Could you explain your requirement.

    Thanks.

  • shariq

    Member
    September 20, 2018 at 6:49 PM in reply to: How can I get the list of Junction objects in Salesforce using Apex Code?

    Hi,

    You can use Schema standard class given bu salesforce to retrieve sobjects meta data.

    Hope this helps.

  • shariq

    Member
    September 20, 2018 at 6:48 PM in reply to: Can we call a future method from a Salesforce batch class using Apex?

    Hi,

    NO we can't call async method from another async method, it will throw System.Async Exception.

    Hope this helps.

Page 25 of 57