Hi,
How can I trigger a plugin for a parental relationship, that is when child entities are added in a sub-grid from within the parent itself. Say for example adding a contact to an account.
Any suggestions are most welcomed.
*This post is locked for comments
You could add a flag field on the contact and map it from Accounts so only contact made from Quick Create off of Accounts would have it populated. Then check to see if the flag is populated before you run your Contact Creation from Account workflow.
You need to put a check to see if the lookup of account is null or not in your code. If it's not null then contact is created from account
Hi Inogic,
But if I register a plugin to fire on create of Contact then it would fire on every contact creation? I just want to fire it when a contact is created from within an account.
From your requirement it seems that you want to register a plugin to fire on create of child record.
So as explained you can register a plugin on create of Contact record and then check the parent lookup value so that you get the value and perform your operations.
Thanks!
There's a number of Workflow Plugins that allow you to create One-to-Many workflows. The one that I've used often is included in the Gap Consulting Workflow Essentials pack:
www.gapconsulting.co.uk/.../workflow-essentials
Once you install it, look under the Record tools, and you'll see the One-to-Many workflow step. You'll just need to note the Entity and Relationship it should traverse and what workflow you'll want to run on it.
Codeplex has a number of options to as well. I just like the Gap one because it contains a number of other helpful workflow tools.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156