"Primary button clicked" handler doesn't update record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
58m ago - last edited 5m ago
Hey guys!
I have a problem with updating the state of a record from a specific table in our instance. It should be dynamic, since there are various cards (in a "Carousel"), so there are various cards which have their own buttons.
Here comes a screenshot of my Primary Button Clicked handler script:
Here comes the code for you to be able to copy:
/**
* {params} params
* {api} params.api
* {any} params.event
*/
function evaluateEvent({api, event}) {
return {
table: "x_vgll_rail_request",
recordId: api.state.selectedRecord,
templateFields: "state=7",
useSetDisplayValue: null
};
}
The client script called "Update Record" is empty, like this:
So is the "Client state parameter":
So why doesn't the records' state get updated when I click on the button here in front-end? I cannot see that there is anything wrong. Here is the primary button:
So when "Ja" (Yes) is clicked, the state should change to closed. But nothing happens.
I hope you can help me. 🙂
