Windchill REST Services > Windchill REST Services Domain Capabilities > Examples for Basic REST Operations > Examples for the PTC BOM Transformation Domain > Updating the Common Attributes of Extended Data
  
Updating the Common Attributes of Extended Data
You can update the PhantomManufacturingPart attribute of single or multiple Plant Data objects by providing the OIDs of the existing objects in the body of the request. You can specify the OID of any iteration/revision/view of the Plant Data object or its subtype in the body of the request. To update its common attribute, you must have Modify permissions to the Plant Data object or its subtype.
To update the common attribute, you must specify the value with its valid internal name. If a constraint is applied to the attribute, you must specify the internal name of the value specified in the constraint.
If you want to clear the value of the common attribute, you can specify its value as null in the request.
If you do not specify the common attribute in the request body, then the attribute retains its existing value.
* 
You cannot update the common attribute of a Plant Data object, if the specified object is checked out.
To update the common attribute, ensure that you specify only the Plant Data object in the request body. You cannot update the common attribute of an Enterprise Data object.
If you specify an invalid object or an object other than a Plant Data object or its subtype (for example, a Part object), then the request fails and returns an error.
You cannot update the common attributes Name and Number.
Example: Updating Common Attribute of a Plant Data Object
This example shows you how to update the PhantomManufacturingPartattribute of a Plant Data object specified in the request. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/BomTransformation/UpdateCommonPropertiesForExtendedDatas
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ExtendedData": [
{
"ID": "OR:com.ptc.windchill.enterprise.data.EnterpriseData:195639",
"PhantomManufacturingPart": true
}
]
}
Example: Updating Common Attributes of Multiple Plant Data Objects
This example shows you how to update the PhantomManufacturingPart attribute for each Plant Data object specified in the request. In this example, the request updates the attribute values for the two Plant Data objects as false and true, respectively. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/BomTransformation/UpdateCommonPropertiesForExtendedDatas
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ExtendedData": [
{
"ID": "OR:com.ptc.windchill.enterprise.data.EnterpriseData:195639",
"PhantomManufacturingPart": false
},
{
"ID": "OR:com.ptc.windchill.enterprise.data.EnterpriseData:195541",
"PhantomManufacturingPart": true
}
]
}
Example: Clearing the Values of Common Attributes
This example shows you how to clear the values of the common attributes for the Plant Data objects specified in the request. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/BomTransformation/UpdateCommonPropertiesForExtendedDatas
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ExtendedData": [
{
"ID": "OR:com.ptc.windchill.enterprise.data.EnterpriseData:195639",
"PhantomManufacturingPart": null
},
{
"ID": "OR:com.ptc.windchill.enterprise.data.EnterpriseData:195541",
"PhantomManufacturingPart": null
}
]
}
Example: Retaining the Values of Common Attributes
This example shows you how to retain the existing values of the PhantomManufacturingPart attribute for the Plant Data objects specified in the request. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/BomTransformation/UpdateCommonPropertiesForExtendedDatas
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ExtendedData": [
{
"ID": "OR:com.ptc.windchill.enterprise.data.EnterpriseData:195639"
},
{
"ID": "OR:com.ptc.windchill.enterprise.data.EnterpriseData:195541"
}
]
}