Symptom
When querying CategoryId ‘14’ (workflow request) in entity ToDoEntryV2 it returns 'null' value for linkUrl.
This URL is required for users to approve and pending Workflow Requests.
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
- SAP SuccessFactors HXM Suite
- OData API
Reproducing the Issue
1. Run the following query in Postman
https://<API-Server>/odata/v2/TodoEntryV2?$top=10&$format=json&$filter=categoryId eq '14'&status eq '2'&$expand=userNav&$select=todoEntryId,categoryId,status,linkUrl,userNav/userId,userNav/defaultFullName,todoEntryName,categoryLabel,subjectId
2. Query returns 'null' value for linkUrl
Cause
All validations queried for the category 14 do not have the linkURL field populated.
According to OData API Developer Guide Category 14 asks to expand the wfRequestNav.
Resolution
To get the required URL to navigate to the pending workflow, please call the following query:
https://<API-Server>/odata/v2/TodoEntryV2?$top=10&$format=json&$filter=categoryId eq '14'&status eq '2'&$expand=userNav,wfRequestNav&$select=todoEntryId,categoryId,status,linkUrl,userNav/userId,userNav/defaultFullName,todoEntryName,categoryLabel,subjectId,wfRequestNav/url,wfRequestNav,status,wfRequestNav/wfRequestid
With this query we can return the URL under the url field, but not the linkUrl. linkUrl filed will still return 'null'
In the query above, we can see the url under another field expanded.
Using this URL, it open in the browser:
Keywords
ToDoEntryV2, linkUrl, null, OData API, categoryId eq '14', wfRequest , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , Problem