project QadFinancials > class MfgNotification > method GetSubject

Description

Retrieves translated subject for the created component type.


Parameters


icLangCodeinputcharacter
ocSubjectTextoutputcharacter
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 ocSubjectText = #T-1'New employee ($1)':30(31235)T-1#.

if vcComponentType = {&NOTIFICATION-SUPPLIER}
then assign ocSubjectText = #T-2'New supplier ($1)':30(31236)T-2#.
else
if vcComponentType = {&NOTIFICATION-CUSTOMER}
then assign ocSubjectText = #T-3'New customer ($1)':30(31237)T-3#.
else
if vcComponentType = {&NOTIFICATION-ENDUSER} 
then assign ocSubjectText = #T-6'New end user ($1)':25(56590)T-6#.

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

/* Currently all business keys specify a single parameter */
assign ocSubjectText = replace(ocSubjectText,"$1":U,vcBusinessKeys).

assign oiReturnStatus = 0.