system.kanoa.inventory.deletePart(partId, userId)
Deletes the part record identified by partId.
This permanently removes the part from the inventory master and should be used carefully as parts referenced by existing stock transactions,
work orders, or BOMs may be constrained by referential integrity on the database side.
Intended for cleaning up parts that were created in error or are no longer stocked.
Parameters
partId Integer: Id of part to delete
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
message String None if success
Example
# Remove an obsolete gasket part that is no longer stocked
partId = 5187
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, message = system.kanoa.inventory.deletePart(partId, userId)
print recordsModified, message