You need to sign in to do that
Don't have an account?

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.
sanbox URL when we click on button:
https://scmdev.corp.inpkg.net:8400/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language=FR&company=FRANCE&BASEPRODUCT=8022735&OK_CODE=EXECUTE#
Production URL when we click on button:
https://corp.inpkg.net/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language=&company=&BASEPRODUCT=8006451&OK_CODE=EXECUTE#
Can anyone please guide on this. How to achieve this?
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'}) { alert('{!$Label.Alert_for_projected_stock}'); } else { window.open("https://{!productForce__c.SAP_Environment__c}.corp.inpkg.net:{!productForce__c.PORT_for_SAP_URL__c}/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language={!productForce__c.Language_Code__c}&company= {!productForce__c.Country_Name__c}&BASEPRODUCT= {!productForce__c.PBcode__c}&OK_CODE=EXECUTE#"); }
sanbox URL when we click on button:
https://scmdev.corp.inpkg.net:8400/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language=FR&company=FRANCE&BASEPRODUCT=8022735&OK_CODE=EXECUTE#
Production URL when we click on button:
https://corp.inpkg.net/sap/bc/webdynpro/sap/zbu_apo_projected_stock?sap-language=&company=&BASEPRODUCT=8006451&OK_CODE=EXECUTE#
Can anyone please guide on this. How to achieve this?
All Answers
To avoid you can use the following, you can add query before checking if condition and check against the queried value.
sforce.connection.query("");
The Field Accessibility is "hidden" in Production. But while deploying from sandbox the Field Accessibility is "Read-Only" in Sandbox.
You make it at least read-only for the user's profile who are gone to use this button.
Regards,
Pawan Kumar