0

I'm working on an external app and i'm trying to add a link there to salesforce records/objects.
When I'm trying to redirect the user to any record/object/user, I'm generating the URL like that: https://${accountOrgUrl}.develop.my.salesforce.com/${resourceId}.
So if I'm passing resourceId of user/record/object, I'm being redirected into the lightining dashboard,
and also to the right user/record/object page. Only for "Field" I don't get this redirection.
For the field, I need to pass the full URL like: ${accountOrgUrl}/lightning/setup/ObjectManager/${subtypeName}/FieldsAndRelationships/${fieldId}/view.
Can I somehow have a 1 link for all of the resources? thanks.

4
  • 1
    Does this answer your question? What is the correct way to build a URL to a Salesforce record from an external system?
    – identigral
    Commented Sep 6, 2023 at 1:00
  • ...my.salesforce.com/${resourceId} should read ...my.salesforce.com/${recordId}. A field is not a record.
    – identigral
    Commented Sep 6, 2023 at 1:01
  • @identigral Thanks, It's exactly what I currently have and it's working to all of the records except for the field. I know that field is not a record - but it means that the redirection wouldn't work for "field"? I will need to create the full URL? ${accountOrgUrl}/lightning/setup/ObjectManager/${subtypeName}/FieldsAndRelationships/${fieldId}/view.
    – Texture
    Commented Sep 6, 2023 at 7:33
  • Object record and field metadata are two very different types of info, thus "full URL" in the case of the latter. But sure, if you want to redirect them somewhere where they can see a field definition, you have it right.
    – identigral
    Commented Sep 6, 2023 at 15:42

0

You must log in to answer this question.

Browse other questions tagged .