One moment please...
 
Exact Synergy Enterprise   
 

Exact.Jobs.SysHrMail

Introduction 

The Exact.Jobs.SysHrMail background job performs several tasks, as described in the following:

  • Marketing This allows you to update some fields of all the accounts found based on the search criteria. This functionality is available via CRM/Reports/Accounts/Search and can only be used to update fields of accounts and contact persons.
  • Export This allows you to export a search result or generated financial report to a Microsoft Excel sheet. After indicating the information that you want exported to the Microsoft Excel sheet, you can create the task for Exact.Jobs.SysHrMail. After running the background job, a task will be created  with the Microsoft Excel file attached. 
  • Mail Merge This sends an e-mail to all accounts or resources listed in the search results. You can prepare a mail merge layout with Baco tags and a predefined text. After running the background job, that document will be sent to all accounts or resources listed in the search results.
  • Request  With this function, you can create a request for every resource listed or with every account listed as the linked account in the request. This is an easy way to create multiple requests for multiple resources or multiple accounts.
  • Cleaning up of accounts This removes non-validated accounts that fall within the criteria defined.

Technical information 

The following tables are involved when running Exact.Jobs.SysHrMail:

  • MailMergePending
  • BacoAppLog

When setting up the mail merge, all information will be entered in MailMergePending. The status of the mail merge is also stored in this table with the value 0, which indicates that the mail merge still has to be run and the value 1, which indicates that the mail merge task has been processed. The data that will be sent is also stored in the table via a SQL query.

When the job is running, it will check MailMergePending for new tasks and performs the tasks listed as '"to do". After processing the tasks, the status is changed to 1 and the log entries are entered BacoProcessLog. In MailMergePending, you can check which type of report has been processed or is going to be processed based on the "report type". There are seven possible values for this field:

  • Mail merge using HRM (resources) data. 
  • Mail merge using CRM (accounts) data. 
  • CNT Mail merge using  the data of contact persons. The e-mails are sent to all contact persons of the specified account. 
  • XR Microsoft Excel export for HRM (resources) data or other types of Exact Synergy Enterprise data using a DLL to create the query or validation. 
  • XC Microsoft Excel export for CRM data or any other types of Exact Synergy Enterprise data that inserts a SQL query into MailMergePending (without separate DLL). 
  • XF Microsoft Excel export for Financials data. 
  • OPT Microsoft Excel export for resource options data.

In order to run this background job properly, two important points need to be taken into consideration on the server where this job is run:

  • Microsoft Excel must be installed. The administrator who runs the SQL Server Agent needs to have started Microsoft Excel or Microsoft Word at least once, because only then will a profile be created for the administrator. 
  • Microsoft Outlook Express must be installed on the server with an account defined for the user or administrator who runs the SQL Server Agent. For this account, it is important that sending mail is possible while receiving mail is less important. However, this is applicable only if the Outlook Express option at E-mail is selected.

The most important setting in Exact Synergy Enterprise for running SysHrMail can be found via HRM/Setup/General/Settings. In this screen, there are two fields available: Server and Port.

 

These two fields determine where the e-mails are sent to. Exact Synergy Enterprise itself is not a mail server and therefore cannot send e-mails by itself. It requires a mail server, for example from the ISP or software like Microsoft Exchange, to get e-mails to their destination. At Server, either the name or IP address from the Microsoft Exchange server is filled in, or the address of the mail server will be made available. The standard port for SMTP is 25. However, this can change based on the settings of the mail server. When these settings are not filled in correctly or not filled in at all, Exact.Jobs.SysHrMail will not be able to send e-mails or perform exports to Microsoft Excel.

You can also set up where the documents resulting from a Microsoft Excel export are created in Exact Synergy Enterprise. You can access this via System/Setup/Settings - General/Processes. You can set a default main category, category, or subcategory for all types of Microsoft Excel exports.

Parameters

The command line parameters are case sensitive in Exact.Jobs.SysHrMail. The following optional parameters are supported:

/X:BA

Only processes account deduplication results exported to Microsoft Excel.

/X:BC

Only processes Microsoft Excel exports for CRM batch updates.

/X:BL

Only processes Microsoft Excel exports for Logistics batch item updates.

/X:BO

Only processes opportunity batch creation results exported to Microsoft Excel.

/X:C or CCM or CNTS or CNT

Only processes sending of emails to the selected accounts according to the following options:

  • C option sends email to the account.
  • CCM option sends email to the main contact.
  • CNTS option sends email to the selected contact.
  • CNT option sends email to all contacts of the account.
  • <Any of the above>:S option disallows multiple emails to be sent out.

/X:CL

Only clears up non-validated accounts.

/X:EXPORT_REQUESTS

Only processes list of requests exported to Microsoft Excel.

/X:MAILMERGE_ACC_ACCOUNT or MAILMERGE_ACC_CONTACT or MAILMERGE_ACC_RESELLER or MAILMERGE_ACC_RESOURCE

Only processes sending of emails to the selected accounts based on Microsoft Word template and according to the following options:

  • MAILMERGE_ACC_ACCOUNT option sends email to the account.
  • MAILMERGE_ACC_CONTACT option sends email to the main contact.
  • MAILMERGE_ACC_RESELLER option sends email to the reseller.
  • MAILMERGE_ACC_RESOURCE option sends email to the resource.

/X:MAILMERGE_REQ_RESOURCE or MAILMERGE_REQ_ACCOUNT or MAILMERGE_REQ_ACCMCNT or MAILMERGE_REQ_CONTACT

Only processes sending of emails to the selected requests according to the following options:

  • MAILMERGE_REQ_RESOURCE option sends emails to the specified resources.
  • MAILMERGE_REQ_ACCOUNT option sends emails to the specified accounts.
  • MAILMERGE_REQ_ACCMCNT option sends emails to the main contacts of the specified accounts.
  • MAILMERGE_REQ_CONTACT option sends emails to the contacts of the specified accounts.
  • <Any of the above>:_DEL option sends emails to the Delivery type address of the specified contact.
  • <Any of the above>:_INV option sends emails to the Invoice type address of the specified contact.
  • <Any of the above>:_POS option sends emails to the Postal type address of the specified contact.
  • <Any of the above>:_VIS option sends emails to the Visit type address of the specified contact.
  • <Any of the above>_<Address type>:S option disallows multiple emails to be sent out to the relevant address type of the specified contact.

/X:OPT

Only processes Microsoft Excel exports for HRM option transactions.

/X:R

Only processes mail merges to be sent to the selected resources.

/X:REQ_HR

Only processes sending of requests to the selected resources.

/X:REQ_CRM or REQ_CRM_ACCOUNT_CONTACT or REQ_CRM_ACCOUNT_CONTACT_ALL

Only processes creation of requests to the selected accounts according to the following options:

  • REQ_CRM_ACCOUNT option sends requests according to the selected accounts.
  • REQ_CRM_ACCOUNT_CONTACT option sends requests according to the selected accounts and the main contacts.
  • REQ_CRM_ACCOUNT_CONTACT_ALL option sends requests according to the selected accounts and the selected contacts.

/X:REQ_ITEMS

Only processes merging of item requests.

/X:XC

Only processes account list exported to Microsoft Excel.

/X:XCT

Only processes Microsoft Excel contract exports.

/X:XF

 Only processes Microsoft Excel financials exports.

/X:XP

Only processes Microsoft Excel procurement exports.

/X:XR

Only processes list of resources exported to Microsoft Excel.

If the parameter /X is not defined, the job will execute all process steps except for the cleaning up of non-validated accounts (/X:CL).

Syntax

The following is the syntax for Exact.Jobs.SysHrMail:

Syntax:

"<Installation directory>\bin\Exact.Process.exe" /DBCONFIG:<database virtualdirectory entry db.config> /ASSEMBLY:Exact.Jobs.SysHrMail /CLASS:SysHrMail /BR:”<Installation directory>” /IBU:<URL>

Syntax example:

"C:\Program Files\Exact Software\SYNNET\bin\Exact.Process.exe" /DBCONFIG:SYNNET390 /ASSEMBLY:Exact.Jobs.SysHrMail /CLASS:SysHrMail /BR:”C:\Program Files\Exact Software\SYNNET\bin\Exact.Process.exe” /IBU:http://synergy.portal.nl/employees

Troubleshooting 

When running SysHrMail, the job will enter log entries which can be viewed via System/Reports/Log/Processes. There are a few error messages which are known to be displayed in Exact Synergy Enterprise. These are due to wrong settings either in Exact Synergy Enterprise or on the server itself. The following describes the error messages and the solutions:

Permission denied This may be displayed when the application is unable to take control of a Microsoft Excel application instance it has created to perform Microsoft Excel exports for HRM or Financials. If you encounter this error, please check the DCOM security settings for the Microsoft Excel application object. This can be done by running "DCOMCNFG" from the Run menu, selecting the Microsoft Excel application object, viewing its properties and checking the rights under the Security tab. More information can be found in technote.

Permission error when performing single mail merge Previously, images will not be merged when performing a single mail merge. Thus, you will see [x] for all images in the mail merge document. To solve this, a "TempImages" folder has been created to temporary store all images used during the single mail merge operation for all users. To ensure that you will not encounter the error message for permission rights during the single mail merge action, the following must be carried out:

  • Rights to windows or winnt's temp directory in C:\ is set for all users.
  • "TempImages" folder in C:\windows\temp is empty.
  • Images in this folder will be deleted whenever the next user performs a single mail merge.

Application-defined or object-defined error or Object variable or with block variable not set  This error message may be displayed when the user running the SQL Server agent is not a domain administrator or a local administrator. The user running the SQL Server Agent must be a valid user in the Exact Synergy Enterprise database with the administrator role and have the administrator rights on the server or in the domain.

Error at create report, report name ClassesGroupsActuals, type(Financial Excel Export), creator id(ServiceSQL001). Error description - ActiveX component can't create object This error message may be displayed when the file "ClassesGroupsActuals.xls" is not located in the folder "Synergy\rep". When the file is not there, it needs to be created. This can be an empty Microsoft Excel sheet.

Related document

     
 Main Category: Support Product Know How  Document Type: Online help main
 Category: On-line help files  Security  level: All - 0
 Sub category: Details  Document ID: 16.169.213
 Assortment:  Date: 06-07-2015
 Release:  Attachment:
 Disclaimer