Category Archives: salesforce

Salesforce Bug in Tests: System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out

I have finally reproduced the bug about “System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out ” error being raised when it should not be raised. It happens when there is a thrown and caught mixed … Continue reading

Posted in Bugs, platform-bug, salesforce | Leave a comment

How to switch from Salesforce Lightning Experience to Classic and Back?

Many newbies are asking about this. How to switch from Salesforce Lightning Experience to Classic and Back? This is the video screenshot demonstrating this.

Posted in salesforce | Leave a comment

Mapping Salesforce Profile Name to Profile Developer API Name

Earlier I have post a question on SSE about how to map Salesforce Profile Name to Profile Developer API Name. Finally I have found solution. While one of the possible point-and-click way is suggested by @user3375426 to create an outbound … Continue reading

Posted in salesforce, Uncategorized | Leave a comment

Using SFDX to auto login to your organizations.

SFDX provides an interesting way to login automatically to the organization you need. The only disadvantage of this approach is that you would need to reconnect each time when you sandbox organization is refreshed. To authenticate sandbox you need to … Continue reading

Posted in salesforce, sfdx | Leave a comment

Preparing package.xml for custom metadata records and sending email containing it to the current user

Preparing package.xml for custom metadata records and sending email containing it to the current user public class MD { public static String buildPackageXMLForMD(SObjectType mdt, String whereClause){ String mdtName = [ select DeveloperName FROM EntityDefinition where QualifiedAPIName = :mdt.getDescribe().getName() ].DeveloperName; List … Continue reading

Posted in salesforce | Leave a comment

Create package.xml for custom metadata records

Sometimes after creation of custom metadata records there is need to deploy them to other organization or to backup them in sandbox. Today I have written a code to build package.xml for that

Posted in salesforce, Uncategorized | Leave a comment