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 365 | Integration, Dataverse...
Suggested Answer

Related field from related entity

(0) ShareShare
ReportReport
Posted on by 5

Hi

I have 2 entities. Works and Tasks

in Works i have Work Category, Work name, Work price.

in Tasks i have Task Name, Work category(Lookup from Works), Work name(Lookup from Works), Task price(Decimal)

What i want to do is when on new task entry user selects Work name so the field Task price is autopopulated from related entity Works field value Work price.

How can i do that?

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    The best way of doing it is to write a JavaScript that will read those field from Work on change of the lookup.

    You can query that data using Xrm.WebApi. In order to build the query you can use DataverseRestBuilder solution or plugin for XrmToolbox.

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    You can also use Real Time workflow to auto populate Price field from Work table based on Work Name

  • julijazas Profile Picture
    5 on at

    Bipin Kumar

    I tried with workflow and it works fine but i would like to get that field popyulated on the fly so when user is creating a record he is able to see that field value before it is saved. then it is only JS i have to write?

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    In that case you need to write js code.

    docs.microsoft.com/.../retrieverecord

    You can also generate your code by using below tool.

    carldesouza.com/.../

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 365 | Integration, Dataverse, and general topics

#1
iampranjal Profile Picture

iampranjal 41

#2
Martin Dráb Profile Picture

Martin Dráb 36 Most Valuable Professional

#3
Satyam Prakash Profile Picture

Satyam Prakash 35

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans