I want to create an action or button on a case to update a number of fields, including account and contact name. I cannot update account with an action as it is a lookup field to the account object. Can I create a button or action to do this? - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Scott MahoneyScott Mahoney 

I want to create an action or button on a case to update a number of fields, including account and contact name. I cannot update account with an action as it is a lookup field to the account object. Can I create a button or action to do this?

My team uses on-demand email to case, to auto create cases from emails sent to our team email. As a result, we occasionally have cases created that are not actionable by our team. To filter these cases out of our metrics and tag them, I created a 'Not Actionable' case status. We have a number of required fields to save a case, so tagging a case as not actionable requries updating a number of fields.

I want to add a button or action to a case that will automatically update all the required fields to some sort of not actionable value. I can do this with a global action for all fields except those that are lookup fields. Account and Contact Name are required fields on the case, and as they are lookup fields I cannot figure out how to hard code them or update them to a specific value. I created a dummy account and contact I would like this button to update those fields to.

Can I do what I want to do here with either a global action or button? If so, how to I update lookup fields. Thanks!
Alex YouroukelisAlex Youroukelis
Hi Scott

There are a couple of ways around this:
  • create two additional lookup fields to Account and Contact on the case object
  • Create a process/workflow to auto populate these two fields with the dummy account and contact
  • In your record Action (not Global Action), set the predefined values for Account and Contact to reference the newly created lookup fields instead, e.g.:
User-added image
 
  • Another option is to create a Flow that is launched by your action or even can be a record triggered flow that is launched when some criteria are met (I'd probably go with the latter)
  • The flow would simply update the standard Account and Contact and other fields to your desired values
In either case, you will probably need to use custom metadata types to store the Id's of your dummy Account and Contact records so that you are not hardcoding these Id's into your automations