Asked by:
“Equipment” entity - 'Business Unit' field/attribute is not updated even after successful execution of 'Update' request.

Question
-
Hi,
Update request (for "Equipment" entity) executes successfully.
“BusinessUnitId” field/attribute is of “lookup” type (takes "EntityReference" as value), which doesn't update.
“siteid” field/attribute is also of “lookup” type (takes "EntityReference" as value), but it updates successfully.
all other fields/attributes updates successfully.
Why update fails for "BusinessUnitId" attribute of "Equipment" entity?
Please comment!
Thanks!
Friday, September 26, 2014 7:36 AM
All replies
-
I note that in the UI, the Business Unit becomes locked once the record has been created. My best guess is an update on this field would result in a key violation.Tuesday, October 7, 2014 8:50 PM
-
Hi,
Thanks for comment.I also assumed that "Business Unit" can't change once it is created.
If you look at the image, search option for "Business Unit" is disabled where as it is enable for "Site" field (Note - Site is updated properly).
I found something strange i.e. If we click on "Actions" menu, there is option "Change Business Unit".
By choosing "Change Business Unit" option, we can change "Business Unit".
My simple question is that why we can't change "Business Unit" from "Search" Option which is disabled, but can change "Business Unit" from "Actions" menu ?
Please comment. Thanks in advance.
Thursday, October 9, 2014 5:54 AM -
If you want to update the Business Unit of an Equipment you need to use the SetBusinessEquipmentRequest message
a simple update of the field businessunitid will not work.
My blog: www.crmanswers.net - Rockstar 365 Profile
- Proposed as answer by Guido PreiteMVP Thursday, October 9, 2014 6:28 AM
Thursday, October 9, 2014 6:28 AM -
Hi Guido,
Thanks for solution.
The solution given by you works fine only if we want to update "Business Unit" of Equipment.
I faced another problem i.e. How to update other fields/attribute (e.g- Description, Mail address) along with "Business Unit" using SetBusinessEquipmentRequest request ?
To solve above problem I tried following -
1> Created ParameterCollection object. Filled it with Keys & Values (keys- Fields, Value - Field Value) which we want to update along "Business Unit".
2> Assign ParameterCollection to "Parameter" property of "SetBusinessEquipmentRequest " object.
Code Snippet is -
After executing "Parameter= collection" statement, it resets the value of "Business Unit" and "EquipmentId" as shown in image.
Can you please advise me how to update "Desscription", "Mail Address" and "Business Unit" using "SetBusinessEquipemntRequest" ?
Thanks.
Monday, October 13, 2014 1:23 PM -
Hi Guido,
Can you please advise me how to update other fields like "Name", "Description", "Mail Address" along with "Business Unit" using "SetBusinessEquipemntRequest" ? (I want to update all the fields in only one request)
Thanks in advance.
Thursday, October 30, 2014 5:31 AM