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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Mapping data isn't working

(0) ShareShare
ReportReport
Posted on by 30

Hello

I've created two custom entities Campus and Student.  Student has a Lookup field to Campus.

I'd like to be able to create new Student records upon a button click from a Campus record  (I created an 'Add Student' button to Campus entity using ribbon workbench).

Both of the entities have an Address field and I'd like the Address field in Campus to be mapped to the address field of Student. 

In the 1:N relationship between the two entities I used mapping to map both of the fields ,but when I click on Add Student the field Address in the opened Student record remains empty.

What could be the problem here? Is it not how mapping works?

I'd appreciate help

Thank you.

*This post is locked for comments

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at

    I think the mapping only works in the UI if you pass additional parameters on the querystring extraqs parameter. These are _CreateFromId and _CreateFromType. If you go to the Navigation item for Students on the Campus form, then click Add New Student, you can see what the querystring should look like. However, I don't think these are documented, so they are officially unsupported.

  • Suggested answer
    Charles Abi Khirs Profile Picture
    3,569 on at

    Hello,

    Mapping the fields in the 1:N relationship will not work unless you are creating the child record from the sub-grid of the parent record.

    In your scenario, you have to manually fill the needed fields from the "Add Student" button using a JavaScript function by fetching the fields values of the parent and fill them in the student record.

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    On the change event of the lookup you should call WebApi function to retrieve the address field values from the Campus entity and populate them in the Student entity. Mapping only works when you add the student by clicking on the Add New Student from within the Campus record.

    Hope this helps.

  • adam90 Profile Picture
    30 on at

    So what you're saying is I need to create a sub grid in Campus that lists all related Student records and then mapping will work? Does mapping only work on sub grids?  

  • Verified answer
    Charles Abi Khirs Profile Picture
    3,569 on at

    Yes. This is where the mapping of the fields between the parent record and  child records will work; otherwise, you will have to do it by adding some functionality to do it (workflow, plugins, JavaScript)

  • adam90 Profile Picture
    30 on at

    I see. Thank you for helping me understand that.

  • fshaikh Profile Picture
    218 on at

    I have done the same it doesn't work. The field data is not copied to the child entity form.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans