Deleting Pending Effectivities for an Effectivity-managed Resulting Object
You can delete existing single or multiple pending effectivities (Date, Lot, Block, and Unit (Serial)) for a part and its subtype in the context of change by specifying the effectivity OIDs in the request body. To delete pending effectivities in the context of change, you must have Modify permission to the relevant change task.
When you delete multiple pending effectivities in a single transaction, the request succeeds only if all the pending effectivities can be deleted. If any of the pending effectivities are not deleted, then the entire transaction rolls back.
* 
The request fails and returns an error, if you —.
Specify invalid objects or pending effectivity OIDs.
Do not have Modify permission to the change task.
Do not reserve the change task for Edit.
Example: Deleting Multiple Pending Date Effectivities
This example shows you how to delete two pending Date effectivities by specifying the change task OID and the ResultingLink OID in the request URI. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ChangeMgmt/ChangeTasks('OR:wt.change2.WTChangeActivity2:232826')/ResultingLinks('OR:wt.change2.ChangeRecord2:233437')/PTC.ChangeMgmt.RemovePendingEffectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PendingEffectivities": [
{
"ID": "OR:wt.eff.PendingDateEffectivity:206374"
},
{
"ID": "OR:wt.eff.PendingDateEffectivity:206375"
}
]
}
Example: Deleting Multiple Pending Lot Effectivities
This example shows you how to delete two pending Lot effectivities by specifying the change task OID and the ResultingLink OID in the request URI. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ChangeMgmt/ChangeTasks('OR:wt.change2.WTChangeActivity2:232826')/ResultingLinks('OR:wt.change2.ChangeRecord2:233437')/PTC.ChangeMgmt.RemovePendingEffectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PendingEffectivities": [
{
"ID": "OR:wt.eff.PendingLotEffectivity:208315"
},
{
"ID": "OR:wt.eff.PendingLotEffectivity:208317"
}
]
}
Example: Deleting Multiple Pending Block Effectivities
This example shows you how to delete two pending Block effectivities by specifying the change task OID and the ResultingLink OID in the request URI. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ChangeMgmt/ChangeTasks('OR:wt.change2.WTChangeActivity2:232826')/ResultingLinks('OR:wt.change2.ChangeRecord2:233437')/PTC.ChangeMgmt.RemovePendingEffectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PendingEffectivities": [
{
"ID": "OR:wt.eff.PendingBlockEffectivity:208322"
},
{
"ID": "OR:wt.eff.PendingBlockEffectivity:208320"
}
]
}
Example: Deleting Multiple Pending Serial Effectivities
This example shows you how to delete two pending Serial effectivities by specifying the change task OID and the ResultingLink OID in the request URI. Use the following POST URI with the request body.
URI
POST Windchill/servlet/odata/ChangeMgmt/ChangeTasks('OR:wt.change2.WTChangeActivity2:232826')/ResultingLinks('OR:wt.change2.ChangeRecord2:233437')/PTC.ChangeMgmt.RemovePendingEffectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PendingEffectivities": [
{
"ID": "OR:wt.eff.PendingSerialNumberEffectivity:208399"
},
{
"ID": "OR:wt.eff.PendingSerialNumberEffectivity:208398"
}
]
}
Was this helpful?