dear all
I need to stop proceeding to the next stage when Cities (subgrid) is empty AND current stage is “GATHERING DATA”.
How I can do this?
please check the image below :
*This post is locked for comments
Hi Ahmad,
first of all you need to check that Cities subgrid has record in it using fetch xml query or sdk.rest and along with it also check the stage id or name, and if your condition matches disable the next stage button on business process flow.
Hope this helps!!!
Best Regards,
Shahbaaz
Can you help with some scripts if possible as i dont have such experience.
thanks,
Better to use plugin to validate your requirement. Throw exception if validation failed.
can you help with some scripts?
Hi,
Create a plugin to do that.
How to retrieve records using Fetchxml
https://msdn.microsoft.com/en-us/library/gg328117.aspx
How to retrieve records using Query Expression
https://msdn.microsoft.com/en-us/library/gg328300.aspx
if the return result is 0
throw new InvalidPluginExecutionException("right msg");
How to Create Plugin
https://www.youtube.com/watch?v=edOwzUJ30kk
If you do not have any experiences on doing plugin. You also can use below method
Create a rollup field
https://community.dynamics.com/crm/b/meganwalker/archive/2017/09/18/counting-records-with-rollup-fields-and-record-hierarchy
Create a workflow
- if rollup field is 0 , throw error.
How to throw error in CRM using real time workflow.
survivingcrm.com/.../using-real-time-workflows-to-show-error-messages
thanks a lot.
really appreciate.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Community Member 2
HR-09070029-0 2
UllrSki 2