Updating Multiple Extended Data Objects
You can update the attributes of single or multiple Extended Data (Enterprise Data and Plant Data) objects or its subtypes by providing the OIDs of the existing objects in the body of the request body. You can specify the OID of only the latest iteration of a revision of the Extended Data object or its subtype in the body of the request. You can update both modeled and all other types of attributes associated with Extended Data object including IBAs such as enumerated lists. You can also choose to specify the Change object (Change Task, Change Notice) in the request body to record the updates.
To update an Extended Data object, you must have Read and Modify access to the object. To update an Extended Data object in the context of a Change, you must have Read and Modify access to the Change object.
To update the attributes of an Extended Data object or its subtype, you must first check out the Extended Data object. If a constraint is applied to the attribute, you must specify the internal name of the value specified in the constraint.
* 
You cannot update an Extended Data object, if the specified object is already checked out by another user.
If the update of any of the Extended Data objects fails, then all the changes are rolled back.
You cannot update the master attributes Name, Number, and Phantom Manufacturing Part.
If you specify an invalid object, then the request fails and returns an error.
Example: Updating Multiple Extended Data Objects
This example shows you how to update the attributes of two Extended Data objects specified in the request body. Use the following POST URI.
URI
POST /Windchill/servlet/odata/BomTransformation/UpdateExtendedDatas
Request Header
POST /Windchill/servlet/odata/BomTransformation/UpdateExtendedDatas
Request Body
{
"ExtendedDatas": [
{
"ID": "OR:com.ptc.windchill.enterprise.data.PlantFunctionalData:205351",
"Description": "Description1",
"ExtendedDataAttr1": {
"Value": 124123,
"Unit": "USD",
"Precision": -1
}
},
{
"ID": "VR:com.ptc.windchill.enterprise.data.EnterpriseData:210173",
"Description": "abc",
"EnDGlobalInt": 514,
"EnDLocalBoolean": true,
"@odata.type": "#PTC.BomTransformation.CommonEnterpriseData"
}
]
}
* 
To update attributes specific to an Enterprise Data or Plant Data, you must specify the following attribute and value in the request body:"@odata.type": "#PTC.<DomainName>.<InternalNameoftheType>". For example, to update the attributes EnDGlobalIntand EnDLocalBoolean specific to Enterprise Data, you must specify the following attribute and value in the request body:"@odata.type": "#PTC.BomTransformation.CommonEnterpriseData".
Example: Updating Multiple Extended Data Objects in the Context of Change
This example shows you how to update the attributes of three Extended Data objects in the context of Change. In this example, the OID of a Change Notice is specified for each Extended Data object in the request body. Use the following POST URI.
URI
POST /Windchill/servlet/odata/BomTransformation/UpdateExtendedDatas
Request Header
POST /Windchill/servlet/odata/BomTransformation/UpdateExtendedDatas
Request Body
{
"ExtendedDatas": [
{
"ID": "OR:com.ptc.windchill.enterprise.data.PlantFunctionalData:205350",
"ResultedByObjects@odata.bind": [
"ChangeItems('VR:wt.change2.WTChangeOrder2:999999')"
]
},
{
"ID": "OR:com.ptc.windchill.enterprise.data.PlantFunctionalData:205351",
"ResultedByObjects@odata.bind": [
"ChangeItems('VR:wt.change2.WTChangeOrder2:111111')"
]
},
{
"ID": "VR:com.ptc.windchill.enterprise.data.EnterpriseData:210173",
"ResultedByObjects@odata.bind": [
"ChangeItems('VR:wt.change2.WTChangeOrder2:123456')"
]
}
]
}
The request adds the iteration of the revision of the updated Extended Data object as Resulting object in a valid Change Task.
Similarly, you can specify the OID of a Change Task object for each Extended Data object in the request body.
Was this helpful?