function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Yamini BathulaYamini Bathula 

Apex Trigger Update a URL with different value in sandox and Production orgs.

Hi Guys,

We have a requirement to update a URL Field of Opportunity in Lead Conversion. I am doing this via APex Trigger. We need to update this URL with Different values in sandbox and Production. This URL is not Salesforce instance URL. This is a different application's URL which is different for testing and Production environments.

I can Update the field using Issandbox field in Organisation object. But my concern is it takes a couple of lines in my code. I would like to have it as a single line in my code. 

Can anyone help me achieve this with a single line of code?

Thanks,
Yamini.
MagulanDuraipandianMagulanDuraipandian
Hi, Check this - https://success.salesforce.com/ideaView?id=0873000000083sJAAQ. Put the method in a utility class to check.