question

simon-2 avatar image
simon-2 asked

Accessing Entity API from a scheduled task

We have a cloudscript function that accesses the entity api to make updates to objects on the title data entity. We are able to run this function with the api call 'ExecuteEntityCloudScript'.

Although we know require this function to be triggered by a scheduled task. Although it appears the scheduled task has no option to execute an 'entity' cloudscript and only allows executing cloudscripts that don't access the entity api. Is there any way to access the entity api via a cloudscript function triggered via a scheduled task?

CloudScriptentitiesscheduled tasks
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered

May I ask what is the scenario that the Cloud Script function can be executed by ExecuteEntityCloudScript but not the ExecuteCloudScript? Are there any detailed error messages that you can share with us?

I have done some tests and use "var result = entity.SetObjects(request);" to update the entity object. The result is successful and remains the same in a Scheduled Task triggered function.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

simon-2 avatar image simon-2 commented ·

Apologies, turns out it was working, we were just getting an error from another part of the code that looked like that entity error we'd seen before.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.