But in all these examples, you can see, that string values added to the entity object.
But how you are going to create a record which has a Lookup (Entity Refernce) value.
You can use following code
var entity = new Object(); entity.Subject = "subject goes here"; //Entity Reference (Also called as Lookup) entity.RegardingObjectId = { Id: Xrm.Page.data.entity.getId(), LogicalName: Xrm.Page.data.entity.getEntityName() }; createRecord( entity, "new_entityNameSet", createAuditActionCompleted, errorOnAuditCreate );
No comments:
Post a Comment