I'm trying to update the OwnerId on an opportunity in Dynamics CRM 2015.
So far I am using the following code but my changes are not taking effect.
Xrm.Page.data.entity.attributes.get('ownerid').setValue('487ecd0c-d8c1-e411-80eb-c4346bade4b0')
Xrm.Page.data.entity.save();
This is a view of the GetValue call.
The attribute type is "lookup" and when I call getIsDirty(), it returns false after I do setValue, so I'm not sure if that's the correct way to set the value on a "lookup" type.