Hi,
I am using html web resource to update form value.
Code :
window.parent.Xrm.Page.getAttribute("zep_flagupdatepan").setValue(1);
It is working fine in simple web client but in unified interface it is not working.
Thanks,
keyur shah.
*This post is locked for comments
I got a solution.
Actually unified interface does not support (1 & 0) for two option set field. It is only support true & false.
window.parent.Xrm.Utility.confirmDialog("Do you really want to update PAN details?", function() {
var flag = window.parent.Xrm.Page.getAttribute("zep_flagupdatepan").getValue();
if (flag) {
window.parent.Xrm.Page.getAttribute("zep_flagupdatepan").setValue(false);
} else {
window.parent.Xrm.Page.getAttribute("zep_flagupdatepan").setValue(true);
}
window.parent.Xrm.Page.data.entity.save();
}, function() {
});
Thanks,
Keyur Shah.
I have just click on html button and update form value
PFA.
It is working fine in normal web client but in Unified interface code is not working.
window.parent.opener.Xrm.Page.getAttribute("zep_flagupdatepan").setValue(1); - this code is not working.
Update Code :
window.parent.Xrm.Utility.confirmDialog("Do you really want to update PAN details?", function() {
var flag = window.parent.Xrm.Page.getAttribute("zep_flagupdatepan").getValue();
if (flag) {
window.parent.opener.Xrm.Page.getAttribute("zep_flagupdatepan").setValue(0);
// window.parent.Xrm.Page.getAttribute("zep_flagupdatepan").setValue(0);
//window.parent.Xrm.Page.getAttribute("zep_flagupdatepan").setValue(0);
} else {
window.parent.opener.Xrm.Page.getAttribute("zep_flagupdatepan").setValue(1);
//window.parent.Xrm.Page.getAttribute("zep_flagupdatepan").setValue(1);
}
window.parent.Xrm.Page.data.entity.save();
}, function() {
});
Hi ,
Are you opening the HTML in separate window or embedded in IFrame?
If you open in popup try with this -
window.parent.opener.Xrm.Page.getAttribute("zep_flagupdatepan").setValue(1);
Other wise you can try to add additional parent in your code .
Hope this helps.
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... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156