Here are a few quick and easy examples of often used PeopleCode. This quick reference is helpful because some of this syntax can be easily forgotten.
Application Package
12345 |
import C_APP_PACK:FooClass;
Local C_APP_PACK:FooClass &foo;
&foo = create C_APP_PACK:FooClass();
&result = &foo.ExampleMethod(&bar);
|
Function
1 |
Declare Function MY_FUNC PeopleCode MY_FUNC.FIELD FieldFormula;
|
SQL Class
123456 |
Local Record &rRecord = CreateRecord(Record.RECORD);
Local SQL &SQL = CreateSQL("SELECT * FROM PS_RECORD");
While &SQL.Fetch(&rRecord)
/**/
End-While;
|
No comments:
Post a Comment