Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Leveraging a custom trigger to delete a Lead from a customer journey doesnt work

Posted on by 28
It would seem that if you create a custom trigger 
 
 
.. and try to use it in the end of a customer journey, using the /Activate a custom trigger/
 
 
.. you can only map the attributes to the /Lead ID/
 
 
.. the problem is the Lead Id IS NOT stored in the /Lead ID/ column of the Lead table, ...
 
 
... its stored in the /Lead/ column of the /Lead/ table
 
 
Since you can't map to the /Lead/ column in the /Activate custom trigger/ tile, is would seem impossible to hand over the lead id to a power automate flow (in order to update or delete the lead)
  • Verified answer
    Wiz of D365M Profile Picture
    Wiz of D365M 28 on at
    Leveraging a custom trigger to delete a Lead from a customer journey doesnt work
    The Profile ID hinted by Josh is NOT the Profile ID in the Lead table (msdyncrm_profileid) , but a "mysterious" msdynmkt_profileid
  • Josh O'Dea Profile Picture
    Josh O'Dea 8 on at
    Leveraging a custom trigger to delete a Lead from a customer journey doesnt work
    Hi @Wiz of D365M
    The profile id is available OOB with Customer Insights Journeys. Could you please try creating a new trigger without any additional fields. I believe the "Lead Identifier" field may actually be causing the problem here. Creating a new trigger with no additional fields should do the trick.
     
    Let me know how you go.
     
    Kind regards,
    Josh
  • Haig Liu Profile Picture
    Haig Liu Microsoft Employee on at
    Leveraging a custom trigger to delete a Lead from a customer journey doesnt work
    @Wiz of D365M - Actually, what I do is not complicated. Just used the tool to copy and paste the /lead/ field value into the /lead ID/ field, and the changes have been fed into the dataverse and everything is working fine.
    But here's the problem: it's not an automated process, I have to manually copy-paste the completion each time. And if at some point in the future we need to use the /lead ID/ field, we'll find that its value is already taken by /lead/.
     
    Inability to use /lead/ field values directly makes for a dilemma.
     
  • Wiz of D365M Profile Picture
    Wiz of D365M 28 on at
    Leveraging a custom trigger to delete a Lead from a customer journey doesnt work
    @Josh O'Dea - thanks. As far as I can see in my environments the Profile ID  attribute of the Lead entity is equally empty for leads created by form submission. I would think that is the case for environments w/o "Customer Insights - Data". 
    @Haig Lui - seems the thing to do. But the strange thing is, the Lead attribute works just fine in fresh trials. I have a hunch something breaks if I do a Publish All Customizations, which is a bit frightening
  • Suggested answer
    Josh O'Dea Profile Picture
    Josh O'Dea 8 on at
    Leveraging a custom trigger to delete a Lead from a customer journey doesnt work
  • Suggested answer
    Haig Liu Profile Picture
    Haig Liu Microsoft Employee on at
    Leveraging a custom trigger to delete a Lead from a customer journey doesnt work
    Hi,
     
    Unfortunately, the Lead (leadid) field is a GUID field and cannot interact with other components or fields.
    So I used the XRMToolbox tool to update the /Lead ID/ field with the /lead/ field value.
    update lead set msdyncrm_leadid = leadid; 
    select leadid,msdyncrm_leadid from lead;
    1. Install XRMToolbox 
    2.Search the Tool Library to install SQL 4 CDS
    3.Connect XRMToolbox to your environment.
    4.Use the update code code and execute
     
    I hope this helps, but please let me know if you need anything else or if you have any other questions.
    thanks,
    Haig Liu

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.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,986 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,623 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans