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 :
Microsoft Dynamics CRM (Archived)

Update records - from lead to custom entity

(0) ShareShare
ReportReport
Posted on by 815

Hi,

I have created a custom entity as "Study customer requirement" and on the lead entity have created a lookup to custom entity. In the custom entity there are 2 fields customer and contacts which is also there on the lead page.

Now on the lead page our regular practice is we select customer and contacts and after saving lead, clicking on Study Customer requirement lookup and select new. Now when new page comes it has to pick customer and contact from the lead page from where we start.

I tried with WF update records but it is not syncing the fields.

Pl help.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at

    You have to create lookup of lead on "Study customer requirement" entity and also map fields Customer and contact.

    You have to click on new from associate view of  "Study customer requirement" from lead or you can add Subgrid of "Study customer requirement" on lead and Click new then Customer and Contact field get auto populate.

  • Syed_Faisal Profile Picture
    815 on at

    Hi,

    I have created a lookup field to lead on ""Study customer requirement" and can see a N:1 relationship created on lead. I tried mapping filed but no luck.

    I cannot use grid here because of multiple screen and space.

  • Dynamics365 Rocker Profile Picture
    7,755 on at

    Can you please share relationship screen shot?

    You can add "Study customer requirement" from lead. Open lead record-->At top Click on arrow> then you will see all related entities list.

  • Syed_Faisal Profile Picture
    815 on at

    Hi

    PFA screenshot.

    63534.Untitled.png

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Syed,

    If you have create a lookup of "Study customer requirement" on Lead entity then its will create N:1 relationship ""Study customer requirement" to Lead entity i.e. 1 "Study customer requirement" can be associated to multiple Lead record. Is this your business requirement?

    If the above is correct requirement then relationship mapping won't work in this case as it will work when you create a lead record from the "Study customer requirement" entity record i.e. parent to child record. However, You can still create a workflow on lead entity and update your custom entity record.

    I would suggest to revisit your customization and check if you need a lookup of your entity on lead or a subgrid as I think subgrid makes more sense.

    Hope this helps.

  • Dynamics365 Rocker Profile Picture
    7,755 on at

    Check in Lead navigation pane-->details, you will get  "Study customer requirement" entity and  create new record from there.

  • Suggested answer
    Community Member Profile Picture
    on at

    According to this relationship, a lead can have multiple custom entities (1:N). Create a workflow on the creation of the App study record, as the app study record has a lookup to the lead, you have availability of the Lead fields which can be used to Update the App study record.

  • Syed_Faisal Profile Picture
    815 on at

    Hi Ravi,

    Thanks for the message. Here requirement is different.

    1. First lead will created

    2. Then on the same lead, a new "Study customer requirement" from lookup.

    3. On the "Study customer requirement" there are 2 fields, Customer & Contact. This both need to get sync from the same lead as lead as already these field assigned.

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Syed,

    Based on the above design, requirement, I don't think you can pass the values from your lead entity to "Study Customer Requirement" entity. Thsi is because when you click on the "new" on the lookup, it will open the new record page of your entity "Study Customer Requirement" and there you don't have any reference/ context from where this record is opened or which record it is related to.

    You could try access the fields from javascript using window.parent.Xrm.....

    Hope this helps.

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Just did a quick try. You can access lead record field using window.opener.

    window.opener.Xrm.Page.data.entity.getId()

    So, you can add a mthoed on the load of your custom entity and then retrieve the fields from lead as above and set it to the custom entity fields in the normal ways i.e. Xrm.Page.getAttribute(<SchemaName>).setValue(window.opener.Xrm.Page.getAttribute(<SchemaName>).getValue());

    Hope this helps.

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans