When i’m creating an object using service (create object in runtime only datasource with cardinality one and persist it in database), i can see in the development tools that the object was saved correctly in the database connected datasource (also in the App UI).
But when i refresh the solution (no other operations, just refresh) - that object is gone from the database connected datasource.
If i am doing the same operation (create object in runtime only datasource with cardinality one and persist it in database) in the app action instead, then the object is still there on the app refresh.
There are no errors in the development tool.
How is that Service triggered? By a Schedule? If that’s the case, have you checked that the Service Account us member if a Role with Create-permissions to that object class?
You may also use GraphQL query to check if that object is actually saved to the database by the service.
I have tried multiple variants (using ‘call service’ action node, and also by triggering service manually through API explorer) and the result is always the same. I have checked that permissions are correct.
If you change the filter of that database connected datasource in the App to “Read all” (or another “wider”) filter, can you then see it? And have your verified the existence of it in the database (graphql)?
I have enabled GraphQL, and the result is that count number for objects is increasing, but the query with same filter doesn’t return newly created objects:
Now we’re onto something that we may recreate - nice. We’ll check this one out and get back to you soon.
But first, can you try the same, but use
2023-09-01T00:00:00.000Z in the filter expression instead of just
Yes, it returns the same result as on the previous screenshot
Any feedback on this issue?
I tried to recreate this issue now after the release, but I am not able to do so. The count and the query for the records gives the same number of records using filter with gte. Do you still get the same result if you run those queries again?
Yes, i’ve just tried it again and count has increased, but no new records are returned:
I see that this “oppgave” is a file object class, and with that information, we’ve identified the issue. Files that have been deleted from Apps, Services or GraphQL have a hidden state “Pending deletion” meaning that they will be automatic deleted withing 24 hours or so, but these files are virtually deleted for your Apps, Services and GraphQL. Except when using the count in Graphql: The files pending deletion are included.
I’ve registered a challenge on this one now, hoping for å patch as soon as a fix is in place.
ok, thank you, this can be closed