Symptom
Requiremnet is to update the Global Assignment Startdate via the Odata API before the approval of global assignment workflow. So basically-
- Is there a way to access the un-approved future dated data row via Odata API ?
- Is it possible to update the effective start date of an existing record using Odata API?
Currently it is possible via UI, however when we try to do this using ODATA API system is creating another row rather than updating the previous one.
Reproducing the Issue
Updating the start date of the approved Global Assignment: This can be achieved via UI ( SF Application), by the following navigation.
- Login As admin
- Select user , go to the employment information
- Select the future assignment
- Click on History in the Job Information and go to 'Make Correction' to update the start date. This will automatically update the GA start date.
Resolution
There are 2 workarounds though to achieve the same:
- Import the new data in full purgeType parameter as FULL. Syntax should be as shown below:
odata/v2/upsert?purgeType=full
- Delete the old record and create new record. There is an operation column in job info import file which takes DELETE as a value. So you can have 2 records in the API or import file, one record has only the user-id, start-date, sequence-number and DELETE operation whereas the second record has all the values with new start-date.
Keywords
KBA , LOD-SF-INT-API , API & Adhoc API Framework , LOD-SF-INT , Integrations , How To