Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Suggested answer

How to getValue from Related table's field

Posted on by 705

Hello guys,

Need some help for some JavaScript for I only know just a little bit about this. So in my Model-driven form, I have added field from Related Data - Quick View, Something like this ->
pastedimage1636481634101v1.png

And then I created JavaScript to getValue from this field, by using code ->

    const formContext = executionContext.getFormContext();
 
    const formType = formContext.ui.getFormType();
 
    if (formType == 1) { // If Create
        return;
    }
    
    const isActive = formContext.getAttribute("jyp_active").getValue();

and put this script at OnLoad component of my form.

However I'm hit error like this :

pastedimage1636481867849v2.png

What is the right syntax to get value of that field ? Or is there some differences when the field is coming from a Quick View from related table ?

Btw, please advice whether my question is not clear so I can add more information and make it more clearer. Sorry, because I'm new to this, not sure what I should explain further.

Thanks

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,960 Super User on at
    RE: How to getValue from Related table's field

    Hi,

    Please check below article on how to get field value from quick view form

    nishantrana.me/.../

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,986 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans