URL Hack in Lightning Salesforce

URL Hack in Lightning Salesforce


If you want to use a custom button to create a new record and may be add some default values, you may use this. (Though there are other alternative ways to do this but this way also we can implement)

Considerations - These buttons may not work inside Experience Cloud and in Salesforce Mobile App. Only will work inside Lightning


Scenario 1: Place a button on Quote record named 'Quick Order' to create Order with some default values while on Quote record

Steps:

Object Manager > Quote > Buttons,Links,Actions > New Button or Link > While creating the button > select the Display Type as 'Detail Page Button' > Make sure its available in corresponding layout

Use: /lightning/o/Order/new?defaultFieldValues=Status=Activated,EffectiveDate={!TEXT(TODAY())} and Save and verify


Scenario 2: Place a button on Account record named 'Quick Task' to create Task for that Account with some default values

Steps:

Object Manager > Quote > Buttons,Links,Actions > New Button or Link > While creating the button > select the Display Type as 'Detail Page Button' > Make sure its available in corresponding layout

Use:  /lightning/o/Task/new?&defaultFieldValues=WhatId={!Account.Id},Subject=Call,Status=Completed,Priority=High,ActivityDate={!TEXT(TODAY())} and Save and verify


Visusal: https://www.youtube.com/watch?v=eOEM9r4Ht5E





Comments