on 2024 Mar 06 6:52 PM
Hi All!
We're migrating our MDK app from version 6.3.2 to 2310 and one of the issues we're facing is an error when triggering an UpdateEntity Action, which show us the following error:
mdk.trace.action: Error running action propagating error Action.Type.ODataService.UpdateEntity.1: Error: A query for link targets returned zero targets : Error: A query for link targets returned zero targets
at ODataLinkUpdater.acquireTargets (file:///data/data/com.vale.ptsdigitalqas/files/app/vendor.js:145676:19)
at ODataLinkUpdater.execute (file:///data/data/com.vale.ptsdigitalqas/files/app/vendor.js:145655:14)
at ODataLinkUpdater.execute (file:///data/data/com.vale.ptsdigitalqas/files/app/vendor.js:145537:19)
at ODataUpdater.executeLinkUpdaters (file:///data/data/com.vale.ptsdigitalqas/files/app/vendor.js:145302:33)
at ODataUpdater.executeLinkers (file:///data/data/com.vale.ptsdigitalqas/files/app/vendor.js:145287:14)
at file:///data/data/com.vale.ptsdigitalqas/files/app/vendor.js:145261:18
at new Promise (<anonymous>)
at ODataUpdater.execute (file:///data/data/com.vale.ptsdigitalqas/files/app/vendor.js:145257:16)
at ODataServiceProvider.updateEntity (file:///data/data/com.vale.ptsdigitalqas/files/app/vendor.js:142259:33)
at file:///data/data/com.vale.ptsdigitalqas/files/app/vendor.js:141341:34
While debugging the app I tried to find some rule script which could be failing but this comes directly from the oData Update process.
The action is:
{ "_Type": "Action.Type.ODataService.UpdateEntity", "ActionResult": { "_Name": "update" }, "OnSuccess": "/PTSDigital/Actions/Logs/ExpiredAfterTwentyFourHours.action", "ShowActivityIndicator": true, "ActivityIndicatorText": "$(L,'saving')", "Target": { "Service": "/PTSDigital/Services/ptsdig.service", "EntitySet": "SafeWorkPermissions", "QueryOptions": "/PTSDigital/Rules/ClientData/ReturnSwpIdFromClientData.js" }, "Properties": { "status_id": "EXPIRED", "status_language": "PT" }, "UpdateLinks": [ { "Property": "status", "Target": { "EntitySet": "Status", "QueryOptions": "$filter=id eq 'EXPIRED' and language eq 'PT'" }, "_Enabled": true } ] }
...and I'm sure the rule in QueryOptions returned the expected value.
What I'm missing here?
Thanks in advance!
From the error, I am guessing that the query on the status entity filtering for id eq 'EXPIRED' and language eq 'PT' is not returning any results. I would double check that first to ensure it is returning the expected data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
11 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.