i was just trying to open new service activity window on some event & and after that i was trying to set customers according to the parent contact id
i was just trying with
and i write following code to access paraent contactid look on form load event of service activity window.
// to create lookup array
var customer_lookup=new Array();
// to check for new form
if (crmForm.FormType == 1)
// Check to confirm that the window.opener is present.
// Get the values of the parent form.
var oParentCrmForm = window.opener.document.all.crmForm;
//To check Window.opner is calim entity or not
//10000 objectTypecode for my custom entity you can query ur organization database to check your custom entity’s objectTypecode
if (oParentCrmForm && oParentCrmForm.ObjectTypeCode == 10000)
var customer_lookupItem= new Object();
but i got one confusion when i was trying to open new service activity from action menu i was getting the customers name but when i was trying to open new service activity through my custom button it was not populating …..
after some time i compare both the url Oppsssss i was missing organization name as i was working on multiorganization …….
so i changed my URL fo
and finally it was working ……….