Salesforce Basic

APEX: How to check if ORG is Sandbox or Production

Recently after a major deployment, we took refresh of a sandbox org. One of the developers worked on a change request on the refreshed copy. Unfortunately, he forgot to change Named Credentials, Auth Provider, Remote site setting. After working on the change request, developer started testing the same. This resulted in record creation in third party application through API’s. There were many test records which were created in third party applications and the issue got escalated.

Continue reading “APEX: How to check if ORG is Sandbox or Production”
Lightning · Salesforce Basic

AURA: Updated URL Parameter Value in JS File

I was working on a page in Aura component and the page is loaded on click of a button from a related list(It can also load from a quick Action button). AURA components have a behavior that a component loads with value in cache memory. Which means, AURA component can sometimes load the previously clicked value from URL. Behavior is unpredictable. Which means, Component can load updated value or it can also load previous URL parameter value. For which user may have to click refresh button to load new info.

Continue reading “AURA: Updated URL Parameter Value in JS File”
Salesforce Admin · Salesforce Basic

How to get Picklist value in Formula Field.

When it comes to picklist in formula fields, there are few things which developer need to consider.

  1. Do you want picklist actual value (return text value)?
  2. Do you want to check if user has selected a specific value (return true or false.)?

There are 3 functions that can be used for different purpose to work with picklists in formula field.

  1. ISPICKVAL()
  2. CASE()
  3. TEXT()
Continue reading “How to get Picklist value in Formula Field.”