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
SFDC_nkmSFDC_nkm 

How to Get the URL in Dynamically.

Hi To all,
    I am creating trigger to send a mail whenever my object field is updated.

   I did some functions in trigger and finally send a email.In this Email I want to pass the link also.
    I hardcoded the link as 'https://test.salesforce.com/apex/Pagename.' Its working on sandbox & the link is not working on Production.
    I want to get the URL in Dynamically.
    So that its working on Sandbox & production.
    How to do that???
    
Thanks,
nkm.   

imuino2imuino2

You can use Apexpages.currentPage.getUrl();

To see some documenatation about it and other Apex code issues go here http://www.salesforce.com/us/developer/docs/apexcode/index.htm

 

Ignacio.

SFDC_nkmSFDC_nkm

In trigger Ho w to get the URL in dynamically???

desidskdesidsk

hi,

 

Try using custom setting.