Notifications
Announcements
No record found.
Hi,
We have accounts, which has many contacts, for every contact we have a flag.
Can we set each flag to FALSE without iterating each contact in the account ?
You can create on-demand workflow to set your flag to FALSE. Then use Bulk Worflow execution tool availble on XrmToolBox to execute your workflow against your contacts. Bulk Workflow execution offer the possibility to use views and fetchXml.
Please check this blog for more details about the tool:
www.powerobjects.com/.../
Hello,
I'm afraid you can't.
Can you please tell more about your scenario - may there there is an alternative way to implement your requirement.
Thank You Mehdi El Amri .
As suggested I have created a workflow, now, how can I get the contacts associated with the given account and set the flag for each contact?
Hi Andrew,
We have multiple contacts associated with an Acoount. For each Contact there is a flag xyz.
so, for each contact I need to set the flag as FALSE for a given condition.
Could you please suggest how I can do this using C# ?
Thanks.
You should use bulk workflow execution and use a fetchXml query to execute the workflow against the associated contacts
you can create custom workflow and run as on demand workflow. In your custom workflow you can get the account and by using your account id you can retrieve its contact based on condition by "Query Expression" or "Fetch XML" which suits you. Then you can change the flag.
After creating your workflow select the accounts and run workflow.
Regards,
TNS
You can use microsoft flow to achieve your requirement. But you will have to iterate contact records associated to account.
You can get all contacts associated to Account using Web api filter criteria in microsoft flow.
If you want to go with c# code then you can use query expression or fetchxml to get all contacts associated to account. Use company name field on Contact to get all contacts associated to a particular account.
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 Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 70 Super User 2025 Season 2
Gerardo RenterÃa Ga... 33 Most Valuable Professional
Daniyal Khaleel 32 Most Valuable Professional