Statement 1: No. Xrm.WebApi.online.execute takes a request object, not the name of the action. The object must expose the parameters and a getMetadata function that returns the operationName, so ACTIONNAME is replaced with the request object defined at line AV04.
Statement 2: Yes. The second function passed to then() is the error callback. It receives an object with the error message, which can be displayed at line AV28.
Statement 3: Yes. Users receive a same-origin policy error because the browser cannot call an API that has cross-origin resource sharing (CORS) disabled. A custom action runs on the server, where the same-origin policy does not apply.
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit