[SalesForce] Create Custom URL Button for Case Creation – Field Pre-Population

I am trying to create a custom URL button that will be placed on both a Person Account and a Business Account page layout. I want the button to launch a case creation form with record type = "Member Initiative", Account Name = AccountId of record where the button was pressed, Contact Name = Primary Contact ID of record where the button was pressed (for Business Accounts) and Contact Name = Contact ID of record where the button was pressed (for Person Accounts).

I know this can be done using the quick action button, where you can set predefined field values through point-and-click configuration, however at this time, Salesforce does not allow me to put the "Use Active Assignment Rules" checkbox on an action button form and there are instances where these cases need this functionality. Therefore, I am going down the route of creating a custom URL link so that the full form launches and users have the "Use Active Assignment Rules" functionality.

I have been trying to use this SF resource: https://help.salesforce.com/articleView?id=custom_links_constructing.htm&type=5, but so far I have had no luck, as the Account Name/Contact Name fields are not populating no matter what I do.

Any help is greatly appreciated.
Thanks,

Ricki

Best Answer

You can do like this:-

/lightning/o/Case/new?defaultFieldValues=RecordTypeId=012B0000000RBwHIAW,
AccountId={!Account.Id}&backgroundContext=%2Flightning%2Fr%2FAccount%2F{!Account.Id}%2Fview

enter image description here

enter image description here

enter image description here

Related Topic