As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
The `entityId` is immutable, I am not sure what you’re trying to accomplish by modifying it. Can you elaborate?
P
Paul M
said
almost 10 years ago
I am trying to implement a Business Logic script in onPreFetch that is not working.
It works when I use $kinvey.DataStore.find
It does not work when I use $kinvey.DataStore.get
I used the entityId update in the request object (during preSave) to try to demonstrate that the code was not firing.
In any case, you should be able to replicate by create a onPreSave logic script and calling Kinvey with both a find and and get function from AngularJS.
M
Mark
said
almost 10 years ago
Hi Paul,
I looked in our logs and it seems the onPreFetch is firing for requests issued by `$kinvey.DataStore.get` . You can verify this by looking at the network requests going over the wire, the response header should contain `X-Kinvey-Executed-Collection-Hooks` set to `Pre-Fetch`.
If that header is not there, can you provide me with the `X-Kinvey-Request-Id` header, which should also be part of the response?
Paul M
onPreFetch is not firing when I use $kinvey.DataStore.get (appears to work fine on $kinvey.DataStore.find).
Code to demonstrate not working (i.e. rewrite the entityId):
function onPreFetch(request, response, modules){
request.entityId = "52f6eeb1279fd3ba250554cb";
response.continue();
}
Please help ASAP.
Thanks
Paul