project QadFinancials > class MfgNotification > method GetContent

Description

Retrieves translated e-mail content.


Parameters


icLangCodeinputcharacter
ocContentTextoutputcharacter
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method MfgNotification.ProcessMfgNotification
method MfgNotification.ProcessUsersForCompany


program code (program1/mfgnotification.p)

/* Temporarily switch user's language to recipient's language to translate text properly */
assign vcSavedCurrentLanguage = current-language
       current-language       = icLangCode.

/* Following is used to define translateable strings and specify default text values */
assign ocContentText = #T-5'A new employee ($1) has been created in the $2 domain.':60(31360)T-5#.

if vcComponentType = {&NOTIFICATION-SUPPLIER}
then assign ocContentText = #T-6'A new supplier ($1) has been created by user $3 for the following domains: $2.':120(59538)T-6#.
else 
if vcComponentType = {&NOTIFICATION-CUSTOMER}
then assign ocContentText = #T-7'A new customer ($1) has been created by user $3 for the following domains: $2.':120(59539)T-7#.
else 
if vcComponentType= {&NOTIFICATION-ENDUSER}
then assign ocContentText =    #T-10'A new end user ($1) has been created in the $2 domain by user $3.':80(59157)t-10#.

/* Switch back to user's language back from recipient's language */
assign current-language = vcSavedCurrentLanguage.

/* Currently all business keys specify a single parameter */
assign ocContentText = replace(ocContentText,"$1":U,vcBusinessKeys).
       ocContentText = replace(ocContentText,"$2":U,vcDomainList).
       ocContentText = replace(ocContentText,"$3":U,vcUserName).

assign oiReturnStatus = 0.