Updating the Common Attributes of an Engineering Material
Using this request, you can update the common attributes such as Name and Number of an engineering material object.
To update the common attributes of an engineering material along with the optional owning organization attribute, set the Expose Organization preference to Yes in the Preference Management utility in Windchill.
Example: Updating the Common Attributes of an Engineering Material When the “Expose Organization” Preference is Set to “No”
This example shows you how to update the common attributes of an engineering material. In this example, set the Expose Organization preference to No in the Preference Management utility in Windchill.
Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Sustainability/EngineeringMaterials('OR:wt.part.WTPart:536532')/PTC.Sustainability.UpdateCommonProperties
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Updates": {
"Name": "UpdatedEnggMaterial",
"Number": "New004"
}
}
Example: Updating the Common Attributes of an Engineering Material When the “Expose Organization” Preference is Set to “Yes”
This example shows you how to update the common attributes along with the owning organization attribute for the specified engineering material. In this example, set the Expose Organization preference to Yes in the Preference Management utility in Windchill.
Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Sustainability/EngineeringMaterials('OR:wt.part.WTPart:536588')/PTC.Sustainability.UpdateCommonProperties
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Updates": {
"Name": "UpdatedEnggMaterial2",
"Number": "Updated010",
"[email protected]": "Organizations('OR:wt.org.WTOrganization:118052')"
}
}
這是否有幫助?