web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

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

(1) ShareShare
ReportReport
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)
I have the same question (0)
  • Suggested answer
    Haig Liu Profile Picture
    Microsoft Employee on at
    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
  • Suggested answer
    Josh O'Dea Profile Picture
    8 on at
  • Wiz of D365M Profile Picture
    28 on at
    @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
  • Haig Liu Profile Picture
    Microsoft Employee on at
    @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.
     
  • Josh O'Dea Profile Picture
    8 on at
    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
  • Verified answer
    Wiz of D365M Profile Picture
    28 on at
    The Profile ID hinted by Josh is NOT the Profile ID in the Lead table (msdyncrm_profileid) , but a "mysterious" msdynmkt_profileid

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 163 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 158

#3
Zhilan Profile Picture

Zhilan 49

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans