Thursday, March 5, 2009

Tired of writing the field name in PeopleCode

Tired of writing something like:

If AveryLongRecordName.AveryLongFieldName.Value = 0 Then
....
End-if; ?????

try this trick:

If ^.value = 0 then
.....
End-if;

The ^ gets the recordname.fieldname and inserts its automatically on save

saves you time and helps you avoid mistakes

Avoid double qoutation common mistake

When Developing an Application Engine and deploying a Do Select Statement for example, make sure you don't say

Select column1 from Record1 where column2 = "value"

this is incorrect

The right way is

Select column1 from Record1 where column2 = 'value'

Monday, February 23, 2009

How does the IF Statement work in PeopleCode

IF evaluate Then
   statement
End-if;

or

If evaluate Then
    statement
Else
   statement
End-if;

FieldEdit and FieldChange : What is the difference in terms of PeopleCode?

FieldChange triggers when a key is pressed

FieldEdit triggers even after the focus is lost