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
jcottenjcotten 

how to capture a record id when you can't specifiy the object???

I have a custom task button that I will add to the related list on several different objects.  The button is to trigger flow that will create a new task record. But I need to relate the task to the record from where in the button was clicked.  I need to capture the record Id so that I can populate the WhatId field on the new task.  I don't know how to do this since the Id could come from a variety of different object.  How do I complete this URL?

/flow/Task_Time_Entry?userrole={!$UserRole.Name}&recordid=???
Phillip SouthernPhillip Southern
Unfortunately there isn't a "sobject" merge field you can use for the URL...so you'll have to do different onces for each object when you add the button....ex for leads {!Lead.Id}