Search This Blog

Saturday, March 12, 2011

Access app engine section through peoplecode

I found this piece of code interesting as I didnt have the clue that there was an option to touch the app engine through a code wrapper.

Local AESection &Section;
&Section = GetAESection("RULES", "DYN_SECT");
/* Open the base section */
&Section.SetTemplate("MY_APPL", "TEMPLATE");
/* Set the template section */
&Section.AddStep("NewStep2");
/* Insert NewStep2 */
/* Do some SQL stuff here */
&Section.SetSQL("DO_SELECT", &MySql);
/* Modify the SQL in the added step */
&Section.Save();
&Section.Close();
/* Save and close */



The SetSQL method replaces the SQL associated with the given action type in the current step in the base section with the SQL in string.

No comments:

Post a Comment