AddNews
The AddNews() function creates news (with a subject and a text message) for the specified (or all) departments.
Syntax
AddNews(departmentName, subject, text);
Function arguments
- departmentName – (String) a name of a department to which the news is addressed. You can pass many department names separated by semicolon ’;’ or an empty string for all departments;
- subject – (String) a subject of the news;
- text – (String) the news content (text message).
Return value
This function returns Boolean.
This function always returns true.
Examples
Example 1:
This will create a news for IT department.
AddNews( "IT", "News title", "Message" );
Example 2:
This will create a news for IT and Accounting departments.
AddNews( "IT;Accounting", "News title", "Message" );
Example 3:
This will create a news for all departments.
AddNews( "", "News title", "Message" );