Created
January 28, 2018 22:39
-
-
Save NickPl/7a5071f53faf14bc9324f65bf436c6c9 to your computer and use it in GitHub Desktop.
Blog XrmMtl - CRM 2016 – 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