Below code needs to be written in New Record Event.
function BusComp_NewRecord ()
{
var srOwner = TheApplication().InvokeMethod("LookupValue","ATC_QUEUE_ASSIGNMENT", "Default Queue");
this.ActivateField("Owner");
var srOwnerPickList = this.GetPicklistBusComp("Owner");
srOwnerPickList.SetViewMode(AllView);
srOwnerPickList.ActivateField("Login Name");
srOwnerPickList.ClearToQuery();
srOwnerPickList.SetSearchSpec("Login Name", srOwner);
srOwnerPickList.ExecuteQuery(ForwardOnly);
if (srOwnerPickList.FirstRecord())
srOwnerPickList.Pick();
srOwnerPickList = null;
isNewCIRSR = "Y";
}
function BusComp_NewRecord ()
{
var srOwner = TheApplication().InvokeMethod("LookupValue","ATC_QUEUE_ASSIGNMENT", "Default Queue");
this.ActivateField("Owner");
var srOwnerPickList = this.GetPicklistBusComp("Owner");
srOwnerPickList.SetViewMode(AllView);
srOwnerPickList.ActivateField("Login Name");
srOwnerPickList.ClearToQuery();
srOwnerPickList.SetSearchSpec("Login Name", srOwner);
srOwnerPickList.ExecuteQuery(ForwardOnly);
if (srOwnerPickList.FirstRecord())
srOwnerPickList.Pick();
srOwnerPickList = null;
isNewCIRSR = "Y";
}
No comments:
Post a Comment