Nama ERP DocsNama ERP Docs
Home
Namasoft.com
Data Model
GitHub
Home
Namasoft.com
Data Model
GitHub
  • Home

    • Search
    • Guides

      • بعض المعلومات عن استعمال هذا الموقع
      • Utility Links
      • System Minimum Requirements
      • Nama ERP Installation Guide
      • Jasper Reports Complete Guide for Nama ERP
      • Keyboard Shortcuts
      • Layout Names:
      • Entity Flows
      • دليل استخدام أداة إنشاء التقارير ونماذج الطباعة
      • الفواتير والضرائب والخصومات
      • Supply Chain
      • Tempo Language Manual
      • Sending Invoices and Documents to Customers
      • SMS and WhatsApp Configuration in Nama ERP
      • Field Filter with Criteria
      • تعديل الترجمات في نظام نما
      • Criteria Based Validation
      • صيغ الحضور والانصراف
      • الربط مع ماكينات الحضور والانصراف
      • Nama ERP Notification System
      • Email By Parameterized Reports In Task Scheduler
      • Nama Properties
      • تطبيق الهواتف المحمولة
      • Mobile QR Integrator Guide
      • أعدادات الحقول و الشاشات - Generic Reference Overrider User Guide
      • ReportWizard User Documentation (أداة إنشاء تقرير)
      • ORACLE JDBC Integration Connection in context.xml for integration purposes
      • Nama ERP REST API
      • Criteria from Text Parser
      • ضوابط إنشاء طلبات تطوير من قبل أقسام الدعم الفني والتجهيز بالشركة
      • e-commerce integration (Magento)
      • .
    • Examples
    • Reprocessing Transactions
    • Frequently Asked Questions
    • AI Generated Entity Flows Documentation

      • Core
      • Accounting Module
      • AI Module
      • Contracting Module
      • CRM Module
      • EGTax Reader Module
      • Freight Management System Module
      • Hospital Management System Module
      • HR Module
      • e-commerce Integration Module
      • Manufacturing Module
      • POS Module
      • Real Estate Module
      • Service Center Module
      • Supply Chain Module
      • .
    • Release Notes

      • 2016
      • 2017
      • 2018
      • 2019
      • 2020
      • 2021
      • 2022
      • 2025
      • .
    • Video Tutorials

      • Supply Chain Videos
      • Report Wizard Videos
      • Human Resources Videos
      • .

Email By Parameterized Reports In Task Scheduler

  • Create a task schedule

    • Task Type is Action
    • Action name is com.namasoft.reporting.ParamterizedReporTask
    • First Parameter should be the query that returns the parameter values
    • Second parameter should be the parameter names
    • You can return entities by two columns: parameterName#type, paramerterName#id
    • You can return subject of email by column named subject
    • You can specify send to by a column named sendto
  • Example 1: First Parameter:

select case when DATEDIFF(day,GETDATE(),residencyEnd)<1  then N'الاقامة انتهت منذ ' else N'باقي علي انتهاء الاقامة ' end + cast(ABS(DATEDIFF(day,GETDATE(),residencyEnd)) as nvarchar(100)) +N' يوم' as subject, 'Employee' as sendto#type,supervisor_id as sendto#id,'Employee' as empoyee#type,id as employee#id
from Employee where DATEDIFF(day,GETDATE(),residencyEnd) < 30 order by 2
  • Second Parameter: subject,sendto#type,sendto#id,employee#type,employee#id
  • This will run the specified report, fill in the parameter named employee and send the email to the direct supervisor
  • Example 2:
select case when DATEDIFF(day,GETDATE(),residencyEnd)<1  then N'الاقامة انتهت منذ ' else N'باقي علي انتهاء الاقامة ' end + cast(ABS(DATEDIFF(day,GETDATE(),residencyEnd)) as nvarchar(100)) +N' يوم' as subject,contactInfoEmail as sendto, 'Employee' as empoyee#type,id as employee#id
from Employee where DATEDIFF(day,GETDATE(),residencyEnd) < 30 order by 2
  • This will run the specified report, fill in the parameter named employee and send the email to the email address of the employee

Notification By SQL In Task Scheduler

  • Create a task schedule
    • Task Type is Action
    • Action name is com.namasoft.infra.domainbase.utils.notifications.NotificationByQueryTask
    • First Parameter should be the query that returns the parameter values
    • The second parameter should be the parameter names
    • Third Parameter: If you want the report to be used as a notification, add “notification" to the third parameter, if you want mail add the word “mail".
      • The following will summerize it:
leave the param empty: mail only
mail: mail only
notification: notification only
mail,notification: notification and email
  • You can return entities by two columns: parameterName#type, paramerterName#id
  • You can return subject of notification by column named subject
  • You can specify send to by a column named sendto
  • Example:
    • First Parameter:
select case when DATEDIFF(day,GETDATE(),residencyEnd)<1  then N'الاقامة انتهت منذ ' else N'باقي علي انتهاء الاقامة ' end + cast(ABS(DATEDIFF(day,GETDATE(),residencyEnd)) as nvarchar(100)) +N' يوم' as subject, 'Employee' as sendto#type,supervisor_id as sendto#id,'Employee' as empoyee#type,id as employee#id
from Employee where DATEDIFF(day,GETDATE(),residencyEnd) < 30 order by 2
  • Second Parameter: subject,sendto#type,sendto#id,employee#type,employee#id This will run the specified report, fill in the parameter named employee and send the email to the direct supervisor

Example:

select case when DATEDIFF(day,GETDATE(),residencyEnd)<1  then N'الاقامة انتهت منذ ' else N'باقي علي انتهاء الاقامة ' end + cast(ABS(DATEDIFF(day,GETDATE(),residencyEnd)) as nvarchar(100)) +N' يوم' as subject,contactInfoEmail as sendto, 'Employee' as empoyee#type,id as employee#id
from Employee where DATEDIFF(day,GETDATE(),residencyEnd) < 30 order by 2
Edit On github
Last Updated:: 5/18/25, 12:08 AM
Prev
Nama ERP Notification System
Next
Nama Properties