Updating Manufacturing Raw Material Links
You can update single or multiple manufacturing Raw Material links for a part or Made From Set object by specifying the link OIDs and their attributes in the request body. You can update both modeled and all other types of attributes associated with the link object. This bounded action is available for part or its subtype (excluding Manufacturing Information and Resources) objects only when Windchill MPMLink is installed.
You can update the manufacturing Raw Material links for a part or Made From Set object in context of change (change notice or change task), when the Track “Made From” History Through Change Notice preference is set to Yes.
* 
When the Track “Made From” History Through Change Notice preference is set to Yes, you must specify the ChangeOid attribute and its value. This change information is used to track the Raw Material links.
When the preference is set to Yes, Manufacturing History Objects are added in the UI in the Resulting Objects table of the Change object specified in the ChangeOid attribute value. You must have Create permissions to the Manufacturing History object.
Example: Updating Multiple Manufacturing Raw Material Links for a Part in Context of Change
This example shows you how to update two manufacturing Raw Material links for a part in context of change. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:200476')/PTC.ProdMgmt.UpdateRawMaterialLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"RawMaterialLinks": [
{
"ID": "OR:wt.mpm.rawmaterial.RawMaterialLink:201280",
"LineNumber": 66,
"Quantity": 333,
"Unit": {
"Value": "m",
"Display": "m"
},
"FindNumber": "9",
"TraceCode": {
"@odata.type": "#PTC.EnumType",
"Value": "L",
"Display": "Untraced"
},
"Category": {
"Value": "mounting"
}
},
{
"ID": "OR:wt.mpm.rawmaterial.RawMaterialLink:201284",
"LineNumber": 70,
"Quantity": 5,
"Unit": {
"Value": "m",
"Display": "m"
},
"FindNumber": "9",
"TraceCode": {
"@odata.type": "#PTC.EnumType",
"Value": "L",
"Display": "Untraced"
},
"Category": {
"Value": "semifinished"
}
}
],
"ChangeOid": "OR:wt.change2.WTChangeActivity2:198319"
}
Example: Updating Multiple Manufacturing Raw Material Links for a Made From Set Object in Context of Change
This example shows you how to update two manufacturing Raw Material links for a Made From Set object in context of change. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/BomTransformation/MadeFromSets('OR:wt.part.WTPart:201677')/PTC.BomTransformation.UpdateRawMaterialLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"RawMaterialLinks": [
{
"ID": "OR:wt.mpm.rawmaterial.RawMaterialLink:201280",
"LineNumber": 66,
"Quantity": 333,
"Unit": {
"Value": "m",
"Display": "m"
},
"FindNumber": "9",
"TraceCode": {
"@odata.type": "#PTC.EnumType",
"Value": "L",
"Display": "Untraced"
},
"Category": {
"Value": "mounting"
}
},
{
"ID": "OR:wt.mpm.rawmaterial.RawMaterialLink:201284",
"LineNumber": 70,
"Quantity": 5,
"Unit": {
"Value": "m",
"Display": "m"
},
"FindNumber": "9",
"TraceCode": {
"@odata.type": "#PTC.EnumType",
"Value": "L",
"Display": "Untraced"
},
"Category": {
"Value": "semifinished"
}
}
],
"ChangeOid": "OR:wt.change2.WTChangeActivity2:198319"
}
Was this helpful?