Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

How to getValue from Related table's field

Posted on by 707

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,964 Super User 2024 Season 1 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/.../

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans