Nama ERP DocsNama ERP Docs
Home
Guides
Examples
GitHub
Home
Guides
Examples
GitHub
  • Home

    • Guides

      • بعض المعلومات عن استعمال هذا الموقع
      • Utility Links
      • System Minimum Requirements
      • Reports Guide (Jasper Reports)
      • Keyboard Shortcuts
      • Layout Names:
      • Field Values Calculator
      • Importing Data from Excel or Queries
      • Tempo Language Manual
      • Sending Invoices and Documents to Customers
      • SMS and WhatsApp Configuration in Nama ERP
      • Field Filter with Criteria
      • تعديل الترجمات في نظام نما
      • Criteria Based Validation
      • Attendance Machine Formula Guide
      • Email By Parameterized Reports In Task Scheduler
      • Nama Properties
      • Customer Reward Points (Loyalty Points)
      • دليل استعمال النقاط الفنية في نقاط البيع
      • ORACLE JDBC Integration Connection in context.xml for integration purposes
    • Examples

      • أمثلة لمسارات كيان
    • Reprocessing Transactions

      • Reprocessing Quantity, Cost, and Stock Ages
      • Accounting Utilities - Ledger and Debt Ages Reprocessing
      • Queries to Check for (and Fix) Cost And Qty Problems
      • Inventory Related Utility Queries
      • Manufacturing Utilities
      • Fixed Assets Module Utilities
      • Real Estate Utilities
      • Database Related Operations
      • General Purpose Utility Queries
      • Replication Utilities
    • Frequently Asked Questions

      • أسئلة عامة
      • أسئلة شائعة عن مسارات الكيان
      • أسئلة في موديول التوزيع والمخازن والمبيعات والمشتريات
      • أسئلة شائعة في موديول الرواتب والموارد البشرية
      • أسئلة شائعة عن تصميم التقارير
      • أسئلة شائعة حول أداة إنشاء التقارير
      • أسئلة شائعة عن الموافقات
      • أسئلة شائعة حول فلترة الحقول

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
Attendance Machine Formula Guide
Next
Nama Properties