You are trying to do a submitQueryJob for a standard adhoc entity.
Ideally you expect a task-id to be created. However, you the task-id is not generated but the error appears as mentioned below:
Query Failure! Error: Please set all mandatory prompt fields in "constrain by". [asOfDate]
Successfactors Adhoc API (SOAP)
Reproducing the Issue
Execute the submitQueryJob for an Adhoc entity as shown below.
Here we use the entity "ADHOC_ectint"
The Query fails with the above error message.
Mandatory filters for the entity are missing in the SOAP request.
"Constrain by" is used for adding the filter for mandatory fields in an Adhoc report.
From the describe operation for th entity "adhoc_ectint", We can see that "asofDate" is the only mandatory parameter.Therefore, This needs to be present in the request xml under "constrain by".
You can understand this from the below - (From API describe operation)
We can see that asOfDate is mandatory as explained above. You can also check the same from SFAPI data dictionary.
The highlighted place shows the required attribute to be "true".
Now, Include the constrain by and asOfDate as shown below and observe the output
We can see that the taskId is generated.
You cannot edit the mandatory attributes from a standard Adhoc Entity.
taskId not created Adhoc entity error , KBA , LOD-SF-INT , Integrations , Problem