shariq
IndividualForum Replies Created
-
shariq
MemberSeptember 20, 2018 at 7:29 PM in reply to: How can we develop multi select datalist on the basis of different searches for different element searched for?Hi,
Parul could you explain your code.
Thanks.
-
Hi,
You can search on app exchange, I think there is a feature regarding it.
Hope this helps.
-
Hi,
You can also save the debug in any custom text area field then view it from there.
Hope this helps.
-
Hi,
Debug in loop to show the list values in log
Hope this helps.
-
Hi,
Just Encode using standard EncodingUtil class of salesforce to do it.
Hope this helps.
-
Hi,
You can only log a case using production org.
Hope this helps.
-
shariq
MemberSeptember 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
MemberSeptember 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
MemberSeptember 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.
-
Hi,
Put console.log for debugging and see how much is your code running.
Hope this helps.
-
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.
-
This reply was modified 7 years, 6 months ago by
-
shariq
MemberSeptember 20, 2018 at 7:16 PM in reply to: Grouping records in a report on Visualforce pageHi,
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
MemberSeptember 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
MemberSeptember 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
MemberSeptember 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
MemberSeptember 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
MemberSeptember 20, 2018 at 7:07 PM in reply to: Getting Uncommitted work pending Error in my Test classHi,
Just call DML and webservice class in different transaction.
Hope this helps.
-
shariq
MemberSeptember 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.
-
shariq
MemberSeptember 20, 2018 at 6:59 PM in reply to: How to display names of Contact & Opportunity related to an Account in a Visualforce Page?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
MemberSeptember 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.
-
Hi,
Could you share your code so I can give some solution regarding it.
Hope this helps.
-
shariq
MemberSeptember 20, 2018 at 6:52 PM in reply to: How can i add the ability to upload image using richtext in inputTextArea?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.
-
Hi,
Could you explain your requirement.
Thanks.
-
shariq
MemberSeptember 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
MemberSeptember 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.