andyrav
September 10, 2026, 3:41pm
1
In 2026 how can i run a rowCustomAction
I have created my rowCustomAction but it is not fireing.
in pageload i have
$this->CustomActions["call"] = new ListAction(
"call",
"Call For",
Allowed: IsLoggedIn(),
Method: ActionType::AJAX,
Select: ActionType::SINGLE,
ConfirmMessage: "Call?",
Icon: "fa-solid fa-bell-concierge ew-icon",
Success: "callActionSuccess"
);
thanks
arbei
September 11, 2026, 2:40am
2
Since your ListAction does not have the handler, you still need to implement handler on the server side by Row_CustomAction server event, read Page_Load -> Example 3. Note also that your posted code should be for Page_Load , not Row_CustomAction .
andyrav
September 11, 2026, 10:06am
3
thanks, i got it working using example 3. but how can i auto refresh the page after?
arbei
September 11, 2026, 10:16am
4
Since you use:
andyrav:
ActionType::AJAX,
You need to handle it in your sucess function (e.g. callActionSuccess in your example). For example, you may call window.reload() when necessary.
andyrav
September 11, 2026, 12:13pm
5
thans
thanks when i use the callActionSuccess the pages refreshes on both failed and success but i dont get any success or failed message
$this->CustomActions\["trigger"\] = new ListAction(
"trigger",
"Trigger",
IsLoggedIn(),
ActionType::AJAX,
ActionType::SINGLE,
"Port Triggered?",
"fa-solid fa-phone ew-icon",
"callActionSuccess",
function ($row) {
$result = $this->update(
\[
"triggeredBy" => CurrentUserID(),
"triggeredDate" => new \\DateTime(),
"portstatus" => "Triggered"
\],
\[
"id" => $row\["id"\],
"portstatus" => "call-for",
"Status" => "Accepted"
\]
);
if ($result > 0) {
return true;
}
$this->setFailureMessage(
"Failed to Trigger, Status must be Accepted and PortStatus = Call-For"
);
return false;
},
"Trigger Successfully",
"Failed to Trigger"
);
// Global user functions
window.callActionSuccess = function(data) {
console.log(data);
if (data?.success) {
window.location.reload();
}
};
andyrav
September 11, 2026, 12:20pm
6
also tried
$this->CustomActions["trigger"] = new ListAction(
"trigger",
"Trigger",
IsLoggedIn(),
ActionType::AJAX,
ActionType::SINGLE,
"Port Triggered?",
"fa-solid fa-phone ew-icon",
"callActionSuccess",
fn ($row) => $this->update(
[
"triggeredBy" => CurrentUserID(),
"triggeredDate" => new \DateTime(),
"portstatus" => "Triggered"
],
[
"id" => $row["id"],
"portstatus" => "call-for",
"Status" => "Accepted"
]
) > 0 ,
"Trigger Successfully",
"Failed to Trigger"
);