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.
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
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");
}
Hope it helps.
Best Regards,
Leo
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,902 Super User 2024 Season 2
Martin Dráb 229,297 Most Valuable Professional
nmaenpaa 101,156