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
Mike René KölblinMike René Kölblin 

get the org url per formula

Hi

I want to enter the link to an Opportunity Product into a junktion object within a process in the process builder. After this the useer could click at the link to oppen the opportunity product direct out of this new tab.

Its no problem to get the id of the opportunity object but how could i get the basic url to add it infront of the url?

BR

Mike
Maharajan CMaharajan C
Hi Mike,

Use the below formula in your Process builder Action : 

LEFT($Api.Partner_Server_URL_340, FIND( '/services', $Api.Partner_Server_URL_340)) & Id

* In the  Process  builder Action Choose the Update a record.
* In the Set new field values for the records you update ->Select the Field (create a field as URL Data type)-> Type(Formula)->Value(Build a formula) 
Paste the above Fomula here and In the Id(select your cross object id field to refer the Record ID by click Insert Field)->Use this Formula->Save

Let me know if you want any further help.

If those points are help means mark these as a best answer.

Thanks,
Raj
(Sweet Potato Tec)


 
Gina Szafraniec 3Gina Szafraniec 3
This helped me with a similar problem. I was working with a Flow that would run in a Customer Community. I needed the base URL and I used the formula provided by @Maharajan C. I made one change. I replaced '/services' with '/s/' and it worked. 
Meena K 7Meena K 7
The solution provided by Mahajan worked with flows by replacing Id with {!Record.Id}. Create a formula type resource with data type as text and place LEFT($Api.Partner_Server_URL_340, FIND( '/s', $Api.Partner_Server_URL_340)) & {!Record.Id} inside it. Then while using it on a rich text template, simple put the resorce name and in the link, again place URL resource from flow. Works like charm!
Adam Lederman 18Adam Lederman 18
Hello,
I had a similar request but to have a link to the same record as full text.  In order for this to work for me I had to use the following variation:
 
Left($Api.Partner_Server_URL_540, (LEN($Api.Partner_Server_URL_540) - ((FIND("/services", $Api.Partner_Server_URL_540))+1))) & "lightning.force.com/lightning/r/Lead/"& Id &"/view"
You will need to replace the Object Type Name in the above "Lead" with the Object that the formula field is for.
Adam Lederman 18Adam Lederman 18
Note on above.. the +1 is needed for sandbox, remove the +1 for Production