I've got a PreContactCreate plugin that fires on the Contact entity. This also gets fired when the 'Quantify' button is clicked on a Lead. Within the plugin in ExecutePreContactCreate(), how can I identify whether a Lead was quantified rather than for example, a new Contact was created directly in the Contact section of CRM?
*This post is locked for comments
Hello,
There are couple of ways but as for me easiest is to check originatingleadid from contact like following:
var target = context.InputParameters["Target"] as Entity;
if (target.Contains("originatingleadid")
{
//your logic when contact is created during qualification
}
else
{
//other sources of creation of contact
}
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