+ Start a Discussion
Ravindar AdminRavindar Admin 

formula values are not getting in URL in Production

I created a custom button on custom object.
Behavior= "Execute Javascript"
Content Source="Onclick Javascript"
I have written the following code in sandbox. It is working in Sandbox. But, In Production, Formula values are not getting.
if({!productForce__c.Channel_code__c<>'Z0'&&productForce__c.Channel_code__c<>'Z4'}) {
   } else {


sanbox URL when we click on button:

Production URL when we click on button:

Can anyone please guide on this. How to achieve this?
Best Answer chosen by Ravindar Admin
Shruti SShruti S
Can you please verify if the Field Accessibility of the fields involved is turned ON ?

All Answers

Shruti SShruti S
Can you please verify if the Field Accessibility of the fields involved is turned ON ?
This was selected as the best answer
Field Visibility could be a problem for this. Please verify field visibility for this field.

To avoid you can use the following, you can add query before checking if condition and check against the queried value.

Ravindar AdminRavindar Admin
Hi Shruti & Pawan,

The Field Accessibility is "hidden" in Production. But while deploying from sandbox the Field Accessibility  is "Read-Only" in Sandbox.
Hi Ravinder,

You make it at least read-only for the user's profile who are gone to use this button.

Pawan Kumar
Shruti SShruti S
You have to set the Field Accessibility seperately in the Production. You will have to make it visible to the desired users or profiles.