Thank you for this. It helped me solve my problem. A small optimization would be not to query the lead, but just set Lead leadRecord = new Lead( Id = leadIds[0] ); on line 19 of the code (@14:58).
Thank you for this. Do you know if it's possible to fire lead assignment from the flow WITHOUT using apex? There is a 'Apply Lead Assignment Rules' action within flow, but I can't seem to get this to work!
@@sfdcpanther thank you. Is it possible to make video that has to do with territory assignment rule reassignment when record is edit from the inline edit button? Or when an api call edit the record. Thank you!
It completely depends upon the requirement you are looking to implement. The short answer is yes but if it becomes more complicated then Invocable apex will work.
I may be wrong but the reason that I am able to conclude is that the DML header for firing assignment rule can only be set by the first DML of the transaction. Even if we make a intermediary dml that won't fire assignments. So to make this happen asynchronous update is needed and that runs in a different context and is an initiating DML that could fire assignments
Thank you for this. It helped me solve my problem. A small optimization would be not to query the lead, but just set Lead leadRecord = new Lead( Id = leadIds[0] ); on line 19 of the code (@14:58).
Thank you for the video. Can you tell why you set after 1 minute scheduled path instead of running immediately?
Thank you for this. Do you know if it's possible to fire lead assignment from the flow WITHOUT using apex? There is a 'Apply Lead Assignment Rules' action within flow, but I can't seem to get this to work!
Such a helpful video. Thank you. Do you have an example of a Test Class for the Apex code?
Can you use this same process for Case Assignment rules?
Yes. You can use
Thanks for the video sir. Does this work on territory assignment rule?
No it will not.
@@sfdcpanther thank you. Is it possible to make video that has to do with territory assignment rule reassignment when record is edit from the inline edit button? Or when an api call edit the record. Thank you!
@@ammarali9043 territory assignment rule works automatically I believe. I have recorded 2 videos related to the same.
i need to trigger the assignment rule whenever lead is created or updated either manually or from external system please help me in solving this issue
You can use the same flow for your use case. Just modify it to run for create and update
@@sfdcpanther a scheduled path did not work on create and update when I tested
Is it possible to Mimic Round robin rule in Flow. So when users get added we dont have to change formula
It completely depends upon the requirement you are looking to implement. The short answer is yes but if it becomes more complicated then Invocable apex will work.
can you please tell me why its designed to run after a min. Why not instantly
Because there would be multiple other processes that are working on lead when the lead is updated so to avoid those we have done that.
I may be wrong but the reason that I am able to conclude is that the DML header for firing assignment rule can only be set by the first DML of the transaction. Even if we make a intermediary dml that won't fire assignments. So to make this happen asynchronous update is needed and that runs in a different context and is an initiating DML that could fire assignments