Can anyone confirm if sc_send_notification() is able to both create a notification and send it to users?
NetMake itself doesn’t seem to use it in that way.
In their app to send notifications, “notif_form_sec_notifications” (method “send_to_inbox”), the sc_send_notification macro seems to be used :
-
only after the notification itself has been created (thus they use the undocumented parameter ‘notification_id’ to reference the notification to send out to users)
-
only when sending notifications to notification profiles (when sending notifications to individual users they do it using plain sql inserts - see php method “send_to_inbox_users” in the same app)
while, according the sc_send_notification online manual, something like this should be enough:
sc_send_notification([
‘title’ => ‘title’,
‘message’ => ‘message’,
‘destiny_type’ => ‘user’,
‘to’ => ‘myuser’,
‘from’ => ‘admin’,
‘link’ => ‘’,
‘dtexpire’ => ‘2026-10-02 23:59:59’,
‘profile’ => ‘proc_notification_profile’,
]);
but when i try that, all i get is this error:
Fatal error: Uncaught Error: Call to a member function GetArray() on bool in
[…]_apl->controle() #3 {main} thrown in
/opt/NetMake/v9-php81/wwwroot/scriptcase/app/procrm/_lib/lib/php/nm_functions.php on line 1073