JavaScript:
function OnLoadForm() { setApprovalOwner() }
function setApprovalOwner() { var setUservalue = new Array(); setUservalue[0] = new Object(); setUservalue[0].id = Xrm.Page.context.getUserId(); setUservalue[0].entityType = 'systemuser'; //setUservalue[0].name = retrievedUser.FullName; Xrm.Page.getAttribute("new_approvalowner").setValue(setUservalue) }
https://crmbusiness.wordpress.com/2012/03/21/crm-2011-setting-a-user-lookup-with-the-logged-in-user-with-javascript/
沒有留言:
張貼留言