Thursday, September 5, 2013

Custom Email Templates: Tip


You might have had requirements where you have to build a configurable email page for messaging purpose. People use several ways to accomplish  this requirement. Message Catalog, Custom page/component are couple of ways to get around this requirement.

Many might have used Generic Templates for this purpose. For those who haven't, you can try this tip.

Generic Templates are basically for the work flow purpose. You can find this under:
Set Up HCM > Common Definitions > Approvals > Generic Templates

You can extend this feature for your custom email functions.

WL_TEMPLATE_GEN is the underlying record for Generic Templates. When you create templates, you will use %numbers for tagging various parameters in workflow.

Generic Template Page Sample
Corresponding DB data

These parameters can be substituted in PeopleCode to extend the Generic Templates usability in custom messaging requirements.

Say for example:
&Message = Substitute(&Body, "%5", &Descr); 

Here we replace %4 with the respective description.

And you have the easiness of using a dynamic email template without creating a dedicated page/component.

This will come handy for sure.

1 comment:

  1. http://docs.oracle.com/cd/E38689_01/pt853pbr0/eng/pt/twfl/task_DefiningGenericTemplates-0716c3.html#UsingPeopleCodewithGenericTemplates-0716c7

    ReplyDelete

Total Pageviews

Copyright © Tech & Management Notes