Setting Pending Effectivities on Parts
You can set single or multiple pending effectivities (Date, Lot, Block, and Unit(Serial)) on single or multiple parts and their subtypes in the context of change.
To set the pending effectivity, you must reserve the relevant change task for Edit.
* 
The request fails and returns an error if you:
Do not have Modify permission to the existing change task related to the ResultingLink object.
Do not reserve the change task for Edit.
Specify an invalid object OID.
Do not provide all required attributes.
Specify an invalid effectivity context, effectivity range, or effectivity type.
Provide a Trace Code that is not compatible with the specified effectivity type.
Example: Setting a Pending Date Effectivity
This example shows you how to set a pending Date effectivity on one part and one subtype of part by expanding on effectivity context. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/SetPendingEffectivities?$expand=PendingEffectivities($expand=EffectivityContext)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ResultingLinkItem": [
{
"ID": "OR:wt.change2.ChangeRecord2:211689"
},
{
"ID": "OR:wt.change2.ChangeRecord2:211878"
}
],
"PendingEffectivities": [
{
"@odata.type": "#PTC.ChangeMgmt.PendingDateEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingDateRange": {
"StartDate": "2021-09-14T00:00:00+02:00",
"EndDate": "2021-09-17T00:00:00+02:00"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:217429')"
}
]
}
Example: Setting Multiple Pending Date Effectivities
This example shows you how to set multiple pending Date effectivities on one part and one subtype of part by expanding on effectivity context. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/SetPendingEffectivities?$expand=PendingEffectivities($expand=EffectivityContext)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ResultingLinkItem": [
{
"ID": "OR:wt.change2.ChangeRecord2:213489"
},
{
"ID": "OR:wt.change2.ChangeRecord2:213490"
}
],
"PendingEffectivities": [
{
"@odata.type": "#PTC.ChangeMgmt.PendingDateEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingDateRange": {
"StartDate": "2021-09-14T00:00:00+02:00",
"EndDate": "2021-09-17T00:00:00+02:00"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:217429')"
},
{
"@odata.type": "#PTC.ChangeMgmt.PendingDateEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingDateRange": {
"StartDate": "2021-09-19T00:00:00+02:00",
"EndDate": "2021-09-22T00:00:00+02:00"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:217429')"
}
]
}
Similarly, you can set other types of pending effectivities.
Example: Setting a Pending Lot Effectivity
This example shows you how to set a pending Lot effectivity on one part and one subtype of part by expanding on effectivity context. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/SetPendingEffectivities?$expand=PendingEffectivities($expand=EffectivityContext)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ResultingLinkItem": [
{
"ID": "OR:wt.change2.ChangeRecord2:211689"
},
{
"ID": "OR:wt.change2.ChangeRecord2:211878"
}
],
"PendingEffectivities": [
{
"@odata.type": "#PTC.ChangeMgmt.PendingLotEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingUnitRange": {
"RangeStart": "61",
"RangeEnd": "70"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:217441')"
}
]
}
Example: Setting Multiple Pending Lot Effectivities
This example shows you how to set multiple pending Lot effectivities on one part and one subtype of part by expanding on effectivity context. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/SetPendingEffectivities?$expand=PendingEffectivities($expand=EffectivityContext)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ResultingLinkItem": [
{
"ID": "OR:wt.change2.ChangeRecord2:213490"
},
{
"ID": "OR:wt.change2.ChangeRecord2:213491"
}
],
"PendingEffectivities": [
{
"@odata.type": "#PTC.ChangeMgmt.PendingLotEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingUnitRange": {
"RangeStart": "61",
"RangeEnd": "70"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:217441')"
},
{
"@odata.type": "#PTC.ChangeMgmt.PendingLotEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingUnitRange": {
"RangeStart": "121",
"RangeEnd": "130"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:217441')"
}
]
}
Example: Setting a Pending Block Effectivity
This example shows you how to set a pending Block effectivity on one part and one subtype of part by expanding on effectivity context. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/SetPendingEffectivities?$expand=PendingEffectivities($expand=EffectivityContext)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ResultingLinkItem": [
{
"ID": "OR:wt.change2.ChangeRecord2:211689"
},
{
"ID": "OR:wt.change2.ChangeRecord2:211878"
}
],
"PendingEffectivities": [
{
"@odata.type": "#PTC.ChangeMgmt.PendingBlockEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingUnitRange": {
"RangeStart": "50",
"RangeEnd": "60"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:217441')"
}
]
}
Example: Setting Multiple Pending Block Effectivities
This example shows you how to set multiple pending Block effectivities on one part and one subtype of part by expanding on effectivity context. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/SetPendingEffectivities?$expand=PendingEffectivities($expand=EffectivityContext)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ResultingLinkItem": [
{
"ID": "OR:wt.change2.ChangeRecord2:213491"
},
{
"ID": "OR:wt.change2.ChangeRecord2:213492"
}
],
"PendingEffectivities": [
{
"@odata.type": "#PTC.ChangeMgmt.PendingBlockEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingUnitRange": {
"RangeStart": "50",
"RangeEnd": "60"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:217441')"
},
{
"@odata.type": "#PTC.ChangeMgmt.PendingBlockEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingUnitRange": {
"RangeStart": "100",
"RangeEnd": "110"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:217441')"
}
]
}
Example: Setting a Pending Serial Effectivity
This example shows you how to set a pending Serial effectivity on one part and one subtype of part by expanding on effectivity context. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/SetPendingEffectivities?$expand=PendingEffectivities($expand=EffectivityContext)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ResultingLinkItem": [
{
"ID": "OR:wt.change2.ChangeRecord2:211689"
},
{
"ID": "OR:wt.change2.ChangeRecord2:211878"
}
],
"PendingEffectivities": [
{
"@odata.type": "#PTC.ChangeMgmt.PendingSerialNumberEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingUnitRange": {
"RangeStart": "70",
"RangeEnd": "80"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:217464')"
}
]
}
Example: Setting Multiple Pending Serial Effectivities
This example shows you how to set multiple pending Serial effectivities on one part and one subtype of part by expanding on effectivity context. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/SetPendingEffectivities?$expand=PendingEffectivities($expand=EffectivityContext)
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ResultingLinkItem": [
{
"ID": "OR:wt.change2.ChangeRecord2:213492"
},
{
"ID": "OR:wt.change2.ChangeRecord2:213493"
}
],
"PendingEffectivities": [
{
"@odata.type": "#PTC.ChangeMgmt.PendingSerialNumberEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingUnitRange": {
"RangeStart": "70",
"RangeEnd": "80"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:217464')"
},
{
"@odata.type": "#PTC.ChangeMgmt.PendingSerialNumberEffectivity",
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"PendingUnitRange": {
"RangeStart": "131",
"RangeEnd": "140"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:217464')"
}
]
}
Was this helpful?