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
Jugbeer BholaJugbeer Bhola 

Flow - Record ID is null

Currently the customer wants to use standard pages.  When saving the page, they would like a ‘call out’ to a service to happen. They do not want to press any extra buttons or quick actions.  This should all happen when the standard ‘Save’ button is pressed on a standard ‘Page.’

I was hoping Flow was the answer.  Is it necessary to tie the Flow directly to a button or quick action?  
The Flow obviously is tied to the event of record saving.  It blew up because of a null record ID.  So the Flow knows about the record being saved.  The Flow just does not see the specific record ID.

I have created a variable in the Flow that queries the incoming record ID and assigns it.  The @InvocableMethod annotation method is then called in APEX.  That is where it blows up because the variable is null. 

Is the only answer to create a trigger?  I do not want this to happen when every an sObject type is updated.  Only when actual ‘User Interface’ is happening.

Could someone please advise? Thanks.
 
Best Answer chosen by Jugbeer Bhola
ShirishaShirisha (Salesforce Developers) 
Hi Jugbeer,

Greetings!

You can use Autolauched flow by using Process builder to pass the record Id without using any VF page or custom action.You can fire the process builder whenever the record changes or invoked by some other process.

Reference:https://help.salesforce.com/apex/HTViewHelpDoc?id=process_action_flow.htm&language=en_us

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri

All Answers

ShirishaShirisha (Salesforce Developers) 
Hi Jugbeer,

Greetings!

You can use Autolauched flow by using Process builder to pass the record Id without using any VF page or custom action.You can fire the process builder whenever the record changes or invoked by some other process.

Reference:https://help.salesforce.com/apex/HTViewHelpDoc?id=process_action_flow.htm&language=en_us

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
This was selected as the best answer
Jugbeer BholaJugbeer Bhola
Thank you! A juggling act where one tool should be able to accomplish that but it works.