Saturday, April 10, 2010

Localization - Multi-Lingual Application

I was very much amazed with the application which was set up in multilingual. I never had this kind of experience in my earlier projects. In new project, most of us was never worked in Multilingual application.

We have to work for English and Arabic Languages. We have categorized that there will be following object where we need to work for multilingual applications.
  1. Static List of Values.
  2. Data Validation Manger.
  3. Symbolic Strings.
  4. Alerts in Browser Script.
  5. Error Messages in Server Script.
  6. Email Templates.
  7. Dynamic List of Values.
Testing of the applications in English and Arabic. For the Arabic Applications testing and the label names, we had to call a Translator and we used Google Translator also.

Apart from installing the Application set up in both languages and language packs. Some of the facts are like:-
  • The Arabic application and English application, both use different Object Managers
  • To compile the SRF also.You need to change the language setting of the Server tools
  • You also need to set one Language parameter at Object Manager level. 
  • For each static LOV, you need to mention the LOV and Translate Table at Column level.
  • Use LookupValue in Calculated Field and TheApplication().InvokeMethod("LookupValue", ) for script.
  • For each language,Validation Messages for DVM
  • Symbolic Strings for labels on User Interface.
  • Object Message Category- Error Messages
  • Administration Communication - Email Templates - Languages.
  • Choose the right Parent LIC for Hierarchical Picklist Like if the Child is in Arabic then Choose the Parent LIC also as Arabic only(we were careless while doing this and had to face issues)
Sharing is the Power.

Named Method n - Alternative to Scripting

Named method is a very good alternative to the Scripting if you have custom method to invoke. It can be used both at applet level as well as at BC level. You need to specify a user property Named Method n.

It can be used to do some of  following things:-
  1. Set the field values with or without conditional expression, 
  2. To invoke OOTB methods.
  3. To invoke Business Service/Workflow.
I have used this user property with On Field Update Set and On Field Update Invoke user properties.I really found them very handy to use. I have to use the customize method because in our project Client was very demanding and was very much focused on usability of buttons to perform actions.

Some of the examples I have used of the above user properties are like:-

User Property Value
Named Method 1 "DeclineCase", "SET", "Position Name", "IIF([Case Decline Reason]='Incorrect SM', [Parent Position Name], IIF([Case Decline Reason]='Incorrect Entity', '', [Position Name]))"
Named Method 2 "DeclineCase", "INVOKE", "HLS Case", "WriteRecord"
Named Method 3 "DeclineCase", "INVOKESVC", "HLS Case", "Workflow Process Manager", "RunProcess", "ProcessName", "Case Assignment Email Notification"
Named Method 4 "DeclineCase", "INVOKE", "HLS Case", "RefreshBusComp"

For more details, Please refer the bookshelf.

Sharing is the power

Tuesday, April 6, 2010

Using Email Templates for Automatic triggering of Emails

This is the extended post of my previous posts how to create and use email template on F9, Send Email OOTB functionality. Supplementary to this, I have also posted creating Recipient Group.

In this post, I will tell the rest of the things:-
  1. Creating the New Recipient Source.
  2. Creating the Non-Joined Recipient Group.
  3. Creation of Email template.
  4. Substituting the Fields in the Email text.
  5. Adding HTML templates.
  6. Testing the Outbound Communication Request.
  7. Calling the BS to send the emails.
Let's take a scenario where the Bus Comp is not there listed in the Object for the field Substitutions.

Step1: Query with LOV Type as 'COMM_RECIP_SRC' and Parent LIC as null.
Copy the record and put the Display value and LIC as your Bus Object name.

Step2: Query with the LOV type as 'COMM_RECIP_SRC' and Parent LIC as not null.
Copy the record and put the Display value and LIC as your Child Buscomp which is the Recipient Group BusComp(like Contacts or Employee). Here you may get the unique record error. You may need to update from back end. You can also create Joined Recipient Source.

Step3 and Step4: Creation of Email template

Step5: To add the HTML templates go to Template Items View. There, you need to add the HTML file. In the HTML code, add the fields name inside square brackets for example [Full Name]. Check the Substitute values if you have used substitute fields and message body if you want to add the HTML into message body of the email.

Step6: To Test the Recipient Source, Recipient Group and Email Template, you can create a Outbound Communication Request from Administration-Communication Screen.
  • Go to Outbound Request Overview View, 
  • Create a new record, 
  • Put the Recipient Group. 
The below applets will be based on the Recipient Source and Recipient Group. Like if you Recipient Source is Account, the New button on Recipient Source will be a Associate Applet of Account BC and the Recipient Source will get auto-populated based on the relation of Recipient Source and Recipient Group.

Make sure that Communication Outbound Manager component is up and running and you have selected the Communication Profile at Email template level.

Step7: Now you have created the Recipient Source, Recipient Group and Email templates.
To triggering the email you need to call the 'Outbound Communications Manager' BS and its method CreateRequest. The arguments you need to pass to this method are follows:
  • PackageNameList: Name of the Email Template
  • ProcessMode: Remote for Dedicated Client, Local for Web Client
  • RecipientGroup: Recipient Group Name like Contact
  • SourceIdList: Row Id of the Recipient Source BC like Account
You can call this Business from any triggering point where you want to send the Email.

The best thing about using the Email templates and CreateRequest of Outbound Communications Manager is the flexibility of changing the Email Body while this is not possible if you are using SendMessage of Outbound Communication Manager.

Sharing is the power.