Created
January 28, 2018 04:45
-
-
Save NickPl/818716359e6ebfd85a4271e46862fdde to your computer and use it in GitHub Desktop.
Blog XrmMtl - Update lookup field bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create the lookup value object | |
var lookupReference = []; | |
lookupReference[0] = {}; | |
lookupReference[0].id = "{a0c68c89-9752-e311-93f9-00155d78043f}"; | |
lookupReference[0].entityType = "new_entityname"; | |
lookupReference[0].name = "Display name"; | |
//Magic happens here | |
lookupReference[0].type = "lookup"; | |
//Update the lookup field | |
Xrm.Page.getAttribute("new_entitynameid").setValue(lookupReference); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment