Hi
This only happen when I click on New in the other form.
Does somebody can help me?
Hi
This only happen when I click on New in the other form.
Does somebody can help me?
I Ravi, I sent you a message,
Hi Ravi, it works! again thank you so much.
UYou need to update the schema name of your parent entity in place of "account".
Hi Ravi,
This shows me "LOOKUP CONTROL ERROR: Cannot add item of typename= to the lookup control"
I did something wrong?
Thanks a lot.!
Use the below code.
You need to register this method on load. You also need to replace the field schema values.
=============
function loadParentDetailsToChild() {
try {
var parentAccountId = parent.top.opener.Xrm.Page.data.entity.getId();
var parentAccountName = parent.top.opener.Xrm.Page.getAttribute("name").getValue();
var parentAccountLookup = new Array();
parentAccountLookup[0] = new Object();
parentAccountLookup[0].id = parentAccountId;
parentAccountLookup[0].name = parentAccountName;
parentAccountLookup[0].entityType = "account";
Xrm.Page.getAttribute("parentcustomerid").setValue(parentAccountLookup);
}
catch (err) {
console.log(err.message);
}
}
==========================
Hope this helps.
That is not correct. You have copy pasted the statement I have shared whereas you need to use that statment in your code. Basically you need to create a method and there you need to add that statement. Once done, you need to register that method on the load.
Refer this for JS basics: neilparkhurst.com/.../
I will get back to you with the updated code.
Hi,
You could get the value from parent using the below unsupported javascript-
parent.top.opener.Xrm.Page.getAttribute("name").getValue()
Hope this helps.
Unfortunately not that I know of.
Maybe a technical solution with a custom button that copies over certain fields but I can't help you with that.
On the other side as a functional solution I would propose to change this to or an editable grid or a quick create form for a more rapid approach in creating records.
Any other solution?
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,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156