Monday, July 12, 2010

Call App Engine from peoplecode

The PeopleCode below will show you how to call an Application Engine from PeopleCode. Some refer to this as “Real-Time Application Engine Processing.” For example, when a user save’s a page, you may want a specific App engine program to run. You can also execute this code in a field change event.
The following code calls the Application Engine program named YouAppEngProg, and passes it the necessary initialization values.

&MYRECORD = CreateRecord(RECORD.MY_INIT_VALUES);

&MYRECORD.FIELD1.Value = "123abc"; /* here you are setting the initial values needed by your application engine */

CallAppEngine("YouAppEngProg", &MYRECORD);
First, your state record should have fields like AE_APPLID and AE_SECTION.
Also check whether you have populated these fields properly before the
dynamic section call.
Before the call section , put a peoplecode and code something like that.

CE_ACT_COST_AET.AE_APPLID = "CE_ACTCR_CST";
CE_ACT_COST_AET.AE_SECTION = "Process";

No comments:

Post a Comment