Skip to main content

Notifications

Dynamics 365 general forum

Can't update a label on the Quick View Form in the UCI

Posted on by Microsoft Employee

Hello,

I have an entity form, which has a Quick View Form on it. When entity form is loaded, I update some labels on it with javascript using 'setLabel' function. It works fine in the old interface, but in the UCI labels on the Quick View Form are not updated, though function 'setLabel' is defined and labels on the main form are updated just fine.

Does anyone knows how to fix this? Thanks in advance.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Can't update a label on the Quick View Form in the UCI

    Hi Leo,

    Thanks for your respond.

    I've replaced Xrm.Page calls with formContext, but it didn't help.

    The way you work with labels works for me too, if these labels are placed just on form. Trouble occurs only for labels, which are inside some quick view form, and only in UCI.

    Here is my code:

    function setLabel(executionContext){

    var formcontext=executionContext.getFormContext();

    formcontext.ui.quickForms.get("my_quick_view_form").getControl("my_control").setLabel("New label");
    }

    Do you have any ideas about such scenario?

    Thanks for helping.

    Best regards,

    Daria

  • Suggested answer
    LeoAlt Profile Picture
    LeoAlt 16,329 on at
    RE: Can't update a label on the Quick View Form in the UCI

    Hi partner,

    Please share your code and then we will be able to find out solutions for you.

    BTW, did you use Xrm.Page in your code? If so, I suggest that you could use "executionContext" instead which is more supported in UCI.

    var formContext=executionContext.getFormContext();

    formContext.getControl(arg).setLabel(label);

    Here are my code and I tested in my instance which worked well.

    function setLabel(executionContext){
     var formcontext=executionContext.getFormContext();
     formcontext.getControl("new_opt1").setLabel("Opt22");
    }

    pastedimage1567050056376v1.png

    Hope it helps.

    Best Regards,

    Leo

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,902 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,297 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans