Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

get information from one entity to another

Posted on by Microsoft Employee
hello experts,

As the title clearly states, I am trying to pass some fields of opportunity to another entity.

1_5F00_pantallazo.png
the flow would be the following: - I am looking for a new opportunity in the contract entity. - when selecting the opportunity I am charged some fields that already exist in the opportunity any answer would be very helpful. Thank you

*This post is locked for comments

  • Verified answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: get information from one entity to another

    Hi,

    In addition to that you can look for this sample here: http://himbap.com/blog/?p=2874 here I am implementing similary type of requirement.

  • Verified answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: get information from one entity to another

    What I understand from your question that when you select any opportunity in the lookup you want to get some value from selected opportuity and set to same value in contract entity.

    If my understanding is correct , you need to write a js function which will fire onchange of lookup.

    In the javascript  function create Web api request which will retrieve the opportunity data and on success of web api get the data and set value to contract entity field.

    So download the CRMRestBuilder and make a query

    You can get help from here how to create webapi request.

    www.toplinestrategies.com/.../crm-rest-builder-useful-tool-working-crm-2016’s-web-api

    goutamdascrm.wordpress.com/.../why-dynamics-365-web-api

    Let me know if you have any query.

  • a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: get information from one entity to another

    We're all started from something. Here is article that describes attributes - msdn.microsoft.com/.../gg334409.aspx

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: get information from one entity to another

    Only using Xrm.Page.getAttribute ("<field name>"). SetValue (new field value); I can work?

    Sorry but I've been working with crm for a short time

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: get information from one entity to another

    If you want to use JS you should build proper query and CrmRestBuilder (just google it) can help you to do it and using Xrm.Page.getAttribute("<field name>").setValue(new field value); you can set values from related opportunity. Good luck.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: get information from one entity to another

    Hello, thanks for answering.

    How could I do it with javascript?

    regards

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: get information from one entity to another

    Hello Camilo,

    If you don't want to write code you can use real time workflow to populate mentioned fields. The only downside of this that values will be shown after record is saved.

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,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans