Creating Multiple Parts in Different Organizations
Using this request, you can create one or more parts where each part may inherit the owning organization of the parent or with the owning organization specified while creating that part.
In the Preference Management utility in Windchill, set the Expose Organization preference to Yes.
|
In the Preference Management utility in Windchill, if the Expose Organization and Expose Organization Only for Windchill Supplier Management Parts preferences are set to Yes and the Expose Organization for Change Management Objects preference is set to No, only the supplier management parts can be created.
|
Example: Creating a Part in a Different Organization
This example shows you how to create a part in a different organization by providing the owning organization OID in the request body.
Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/CreateParts
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Parts": [
{
"Name": "TestWTPart",
"@odata.type": "#PTC.ProdMgmt.Part",
"Organization@odata.bind": "Organizations('OR:wt.org.WTOrganization:118052')",
"EndItem": false,
"AssemblyMode": {
"Value": "separable",
"Display": "Separable"
},
"DefaultUnit": {
"Value": "ea"
},
"DefaultTraceCode": {
"Value": "0"
},
"Source": {
"Value": "make"
},
"GatheringPart": false,
"PhantomManufacturingPart": false,
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:118301')"
}
]
}
The request creates the TestWTPart part in the specified organization.
Example: Creating a Manufacturer Part in a Different Organization
This example shows you how to create a manufacturer part in a different organization by providing the owning organization OID in the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/CreateParts
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Parts": [
{
"Name": "TestMfgPart",
"@odata.type": "#PTC.ProdMgmt.ManufacturerPart",
"Organization@odata.bind": "Organizations('OR:wt.org.WTOrganization:206773')",
"EndItem": false,
"ConfigurableModule": {
"Value": "standard",
"Display": "No"
},
"AssemblyMode": {
"Value": "separable"
},
"DefaultUnit": {
"Value": "ea"
},
"DefaultTraceCode": {
"Value": "L"
},
"GatheringPart": false,
"PhantomManufacturingPart": false,
"Source": {
"Value": "buy"
},
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:118301')"
}
]
}
The request creates the TestMfgPart part in the specified organization.
Example: Creating a Vendor Part in a Different Organization
This example shows you how to create a vendor part in a different organization by providing the owning organization OID in the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/CreateParts
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Parts": [
{
"Name": "TestVendorPart",
"@odata.type": "#PTC.ProdMgmt.VendorPart",
"Organization@odata.bind": "Organizations('OR:wt.org.WTOrganization:500152')",
"EndItem": false,
"ConfigurableModule": {
"Value": "standard",
"Display": "No"
},
"AssemblyMode": {
"Value": "separable"
},
"DefaultUnit": {
"Value": "ea"
},
"DefaultTraceCode": {
"Value": "L"
},
"GatheringPart": false,
"PhantomManufacturingPart": false,
"Source": {
"Value": "buy"
},
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:118301')"
}
]
}
The request creates the TestVendorPart part in the specified organization.