Want to display more than 10 fields in related lists?
There is a nice hack by Chris Tzompanakis and it is in the link
Have a nice day!
There was an article about Salesforce Developer Cheatsheets in Salesforce Developers/Contractors linkedin group and here is the link where you can download them:
P.S: Cheat sheets are concise, quick references to various technologies – summarizing the most important aspects in a compact, searchable and printable form.
Has anyone faced this issue before in Flows? I have faced it today and you can click on “This issue Affects me” button, if you think so.
Today, I was working on a requirement which queries public group and sends an email to the users(group members) with an attachment from the custom object record and it was implemented using APEX code. I wanted to test using Execute Anonymous option in Developer Console before I call the code using process builder. When I tried executing it in Developer Console, it was throwing Sending Request – Execution Failed error. I could not figure out the reason for it, but I realised that using workbench to execute Anonymous APEX code is better than Dev Console since your code, results are displayed in the same page and you can set the log level too.
Steps to execute APEX in Workbench:
a. Login to https://workbench.developerforce.com
b. Select Sandbox or Production(obviously, we will test the code in Sandbox first)
c. Then system will ask you to login to Salesforce
d. Once logged in, select “Apex Execute” in Jump to option
e. Paste your code in the text box and click on Execute button.
f. System will show the results on the same page. You can select the appropriate Log category and Log level too.
In the future post, I will write about creating a flow to query the public group based on the name and send an email to the group members(role based members).
Recently, I worked on a requirement where in I had to send an email by using APEX and I had to prepare the HTML body within APEX itself. As part of it, there has to be a clickable link in the email which should take the user to the Salesforce record after clicking on it and we should not hardcode the URL in the code.
So, here is the code below to get the logged in user’s URL and concatenate it with the Salesforce record ID:
String u=System.Url.getSalesforceBaseURL().toExternalForm();//this returns the base URL of the Salesforce instance as String.
String ufinal=u+’/’+POId;//POId is the variable that holds Id of the custom object record.
or you can write the above code in one line:
String ufinal = URL.getSalesforceBaseUrl().toExternalForm() + ‘/’ + POId;
Since I am on vacation now, I didn’t get chance to write posts and I have got a new custom domain for the blog. It is sfdceverywhere.com, don’t worry getintosalesforce.wordpress.com will still work and you will be redirected to the new site.
I will be coming up with more posts on Salesforce topics once I am back from vacation(during 3rd week of Jan). Until then, bye and take care!
If you want to access User license field which determines the type of license that user is on(ex: Salesforce, Salesforce Platform etc), you can access it in apex as follows:
Suppose, you want to create a validation rule in User object to make a custom field mandatory based on the license, it could be as follows,substitute Customfield with the actual field name(API name):
AND(ISNEW(),ISBLANK(Customfield), OR(Profile.UserLicense.Name=’Salesforce’,Profile.UserLicense.Name=’Salesforce Platform’)