hi,
i have two entities like college(parent) and student(child). in student form, college lookup is mandatory. so when student form is opened from college, after entering the values into student on click of save button, it should get saved and closed and also refresh the parent form that is related college record. for this i'm using save callback function which is not working.
this is my code:
function refresh()
{
Xrm.Page.data.save().then(thenSuccessFunction);
}
function thenSuccessFunction()
{
Xrm.Page.ui.close();
Xrm.Utility.openEntityForm("lp_college", Xrm.Page.getAttribute("lp_college").getValue()[0].id);
}
please suggest me what i can do to make this work.
Thankyou in Advance.
*This post is locked for comments
Hi
What happens
if you put the close after opening the parent record.
function refresh() { Xrm.Page.data.save().then(thenSuccessFunction); } function thenSuccessFunction() { Xrm.Utility.openEntityForm("lp_college", Xrm.Page.getAttribute("lp_college").getValue()[0].id); Xrm.Page.ui.close(); }
Sorry, misread the post.. you probably can't use grid onload..
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