DeleteWorkData()
This code sample describes how to delete any previous data that has been stored for the custom workflow attributes in the database tables. This script is called by the UpdateTableValues() script when Livelink updates the data in the database tables.
Function Boolean DeleteWorkData( \ Object prgCtx, \ Integer workID ) Boolean success Dynamic sqlResult Object session = prgCtx.WSession() Object connect = session.fDbConnect //Delete the row in the database table that stores the previous //values for the workflow attribute fields on the Customer tab. sqlResult = CAPI.Exec( connect.fConnection, \ 'Delete from Cust_Customers where ' + \ 'WorkflowID = :A1', \ workID ) success = session.CheckRetVal( sqlResult ) //Delete the row in the database table that stores the previous //values for the workflow attribute fields on the Project tab. if ( success ) sqlResult = CAPI.Exec( connect.fConnection, \ 'Delete from Cust_Project where ' + \ 'WorkflowID = :A1', \ workID ) success = session.CheckRetVal( sqlResult ) end return( success ) end