Play Games

Search This Blog

Showing posts with label Salesforce Posts. Show all posts
Showing posts with label Salesforce Posts. Show all posts

Friday, January 18, 2019

Sort SFDC records based on multiple fields in SOQL query - Salesforce Globe For You

Problem: We have a requirement where we need to sort lead records based on Company field first and then based on Name.

Solution: Yes, we can sort records based on multiple fields as well.

List<Lead> lstLead = new List<Lead>();
lstLead = [Select id,company,name from Lead where name != null order by Company Asc,name ASC];

system.debug('Sorted Lead Records'+lstLead);


Sunday, February 18, 2018

How to prevent password from expiring?

Salesforce provided an option to keep salesforce login password active forever without expiring.

Go to Setup --> Security Controls --> Password Policies 
In 'User Passwords expire in' dropdown we can select 'Never expires' option to prevent password from expiring and click save as shown in the image below.


Friday, February 9, 2018

Salesforce login URL to login to system directly on single click

If the instance is Sandbox:

https://test.salesforce.com/login.jsp?pw=instancepassword&un=instanceUsername

For example if instance username is test@gmail.com and password is India123 ,then URL to login will be

https://test.salesforce.com/login.jsp?pw=India123&un=test@gmail.com

If the instance is production:
https://login.salesforce.com/login.jsp?pw=instancepassword&un=instanceUsername

For example if instance username is test@gmail.com and password is India123 ,then URL to login will be

https://login.salesforce.com/login.jsp?pw=India123&un=test@gmail.com

Thursday, September 4, 2014

OutofMemoryError: Java heap space Error

Problem : When creating a force.com project using eclipse,some times we get the "out of memory Java heap size error".
sometimes while deploying force.com project also,we get the same error.

Solution:
     
step 1:Go to the directory where eclipse executable file is present.










step 2: In the same directory we can see Eclipse.ini file (configuaration settings file).
Open the file in notepad and find the line -Xmx256m.Increase the memory by changing this line
For example -Xmx512m or -Xmx1024m etc.Then save the file and close it.
step 3:Restart Eclipse.