bronafon_ict
asked on
Retrieving Parent Subject from Dynamics subject tree
Hi all
I am using subject trees in Microsoft Dynamics CRM, is there a way of retrieving the parent subject of a selected node.
I managed to grab this code off the net which populates the value but cant determine the parent subject, just wondering if there is a property which holds this information that I am missing.
var lookupItem = new Array;
// This gets the lookup for the attribute new_phonesubjectid on the Phone Call form.
lookupItem = crmForm.all.new_phonesubje ctid.DataV alue;
// If there is data in the field, show it in a series of alerts.
if (lookupItem[0] != null)
{
// The text value of the lookup. Set the subject line of the Phone call to this value
// alert(lookupItem[0].name);
crmForm.all.subject.DataVa lue=lookup Item[0].na me;
// The GUID of the lookup.
alert(lookupItem[0].id);
// The entity type name.
alert(lookupItem[0].typena me);
}
I am using subject trees in Microsoft Dynamics CRM, is there a way of retrieving the parent subject of a selected node.
I managed to grab this code off the net which populates the value but cant determine the parent subject, just wondering if there is a property which holds this information that I am missing.
var lookupItem = new Array;
// This gets the lookup for the attribute new_phonesubjectid on the Phone Call form.
lookupItem = crmForm.all.new_phonesubje
// If there is data in the field, show it in a series of alerts.
if (lookupItem[0] != null)
{
// The text value of the lookup. Set the subject line of the Phone call to this value
// alert(lookupItem[0].name);
crmForm.all.subject.DataVa
// The GUID of the lookup.
alert(lookupItem[0].id);
// The entity type name.
alert(lookupItem[0].typena
}
Hi bronafon_ict,
You will have to query CRM using XmlHttp call to get the parent, When you get subject in the lookup
Regards,
Chinmay
You will have to query CRM using XmlHttp call to get the parent, When you get subject in the lookup
Regards,
Chinmay
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Chinmay
Thanks for the explanation on this one, in a bid to try and recycle some infomation back I found this thread very useful which gave me what I needed, following on from the solution you gave me.
http://www.go4answers.com/Example/retrieve-selected-child-parent-item-120064.aspx
:-)
Thanks for the explanation on this one, in a bid to try and recycle some infomation back I found this thread very useful which gave me what I needed, following on from the solution you gave me.
http://www.go4answers.com/Example/retrieve-selected-child-parent-item-120064.aspx
:-)
Oh these are screen scrapping sites. They steal information from legit sites. The article you are looking at is ripped from Social.msdn.com :)
Anyways... Thanks this will come handy someday.
Anyways... Thanks this will come handy someday.
check this here
http://www.w3schools.com/jsref/dom_obj_all.asp