Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Lookup field : create new record

Posted on by Microsoft Employee

In the lookup field you can create a new record by selecting the New button.

Is there a way to pass data from the current form to the newly created form when there's a N:N relationship between current entity and newly created entity?

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Lookup field : create new record

    I managed to do this with the Window localStorage Property.

    Tested it in chrome, IE11 and Edge. 

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Lookup field : create new record

     Yes I did already try that but I keep getting this error when querying the target, because I have to get the value of a lookupfield in the target entity to update I in the newly created entity.

    Entity entity = service.Retrieve(target.LogicalName, target.Id, new ColumnSet(true));
               

    Unexpected exception from plug-in (Execute): System.TypeLoadException: Inheritance security rules violated while overriding member: 'Microsoft.IdentityModel.Claims.ClaimsIdentity.System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    Kalpavruksh D365 CoE 2,545 on at
    RE: Lookup field : create new record
    Hi,
    It is not possible to create a OOB mapping for N:N entity. You have to write a custom logic using Plugin/JS.
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Lookup field : create new record

    Yes but in my case there's a N:N relationship in between the 2 entities. (A-B)

    On entity A I'm opening the lookup to B and click at the New button. In that new record of entity B I want to have a field X populated with the value of that field X on entity A.  In customizations, mappings are not available at the N:N relationship.

  • Suggested answer
    T.I.A Profile Picture
    T.I.A 1,760 on at
    RE: Lookup field : create new record

    are you looking for something like this? blog.fullscope.com/save-time-entering-data-into-crm-by-mapping-fields-between-records

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans