Updating Attributes of MPMPartToProcessPlanLinks
To update the out of the box (OOTB) attributes of an existing MPMPartToProcessPlanLink object, you must first check out the Part with which it is associated. You can also update modeled and all other types of attributes, including IBAs such as enumerated lists.
If you perform Undo Checkout on the Part object, the changes are rolled back. When you update the MPMPartToProcessPlanLink object, the version of the associated Part will be iterated upon checking it in. To update the MPMPartToProcessPlanLink object, you must specify the link OID in the request body.
To update an 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 an attribute, you can specify its value as null in the request.
If you do not specify an attribute in the request body, then the attribute retains its existing value.
* 
You cannot modify the following attributes: alternateNumber, CreatedOn, LastModified.
Example: Updating Attributes of an MPMPartToProcessPlanLink Object
This example shows you how to update the attributes of an MPMPartToProcessPlanLink object specified in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/Materials('OR:wt.part.WTPart:198246')/PTC.MfgProcMgmt.UpdateMPMPartToProcessPlanLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PartToProcessPlanLink": [
{
"ID": "OR:com.ptc.windchill.mpml.processplan.MPMPartToProcessPlanLink:198249",
"CustomAttribute": "test"
}
]
}
Example: Updating Attributes of Multiple MPMPartToProcessPlanLink Objects
This example shows you how to update the attributes of two MPMPartToProcessPlanLink objects specified in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/Materials('OR:wt.part.WTPart:198246')/PTC.MfgProcMgmt.UpdateMPMPartToProcessPlanLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PartToProcessPlanLink": [
{
"ID": "OR:com.ptc.windchill.mpml.processplan.MPMPartToProcessPlanLink:198249",
"CustomAttribute": "test1"
},
{
"ID": "OR:com.ptc.windchill.mpml.processplan.MPMPartToProcessPlanLink:198248",
"CustomAttribute": "test2"
}
]
}
Was this helpful?