You need to sign in to do that
Don't have an account?
Sweta Agarwal 12
How to get the Object Name from the record Id
Hi
I have written a apex code to call the API (Mulesoft), In order to record the API response I have created a Log table. When a record is created in the Log table, I need to update the record status of the Object (on which the API call was made) to depending on whether the API call was success or failure. I have written a Flow to achieve this. I am passing the recordId of to the flow and to the APEX code. The issue I am facing while updating the record using the recordId within a Update Record instance, I am not aware which Object the record belongs. As a result I have to expand my flow to include an Update Record for each Object for which I am expecting the API respose.
Is it possible to make the "Object" a variable within the "Update Record" Element in the Flow ?? OR Identify the Object Name from the recordId within the Flow.
I have written a apex code to call the API (Mulesoft), In order to record the API response I have created a Log table. When a record is created in the Log table, I need to update the record status of the Object (on which the API call was made) to depending on whether the API call was success or failure. I have written a Flow to achieve this. I am passing the recordId of to the flow and to the APEX code. The issue I am facing while updating the record using the recordId within a Update Record instance, I am not aware which Object the record belongs. As a result I have to expand my flow to include an Update Record for each Object for which I am expecting the API respose.
Is it possible to make the "Object" a variable within the "Update Record" Element in the Flow ?? OR Identify the Object Name from the recordId within the Flow.
Try below.
Thanks,
Vinay Kumar
You can follow a much generalise approach for updating record by working with sObject and Flow.
https://www.captechconsulting.com/blogs/set-your-flows-free-use-the-same-flow-on-multiple-objects
Please mark my solution as the best answer if it helps you.
Regards,
Santosh Kumar