getNamedProperty macro
Use this macro to get a Property the UserArea by its name.
long getNamedProperty(string name)
Return value: the xml node of the property in the UserArea or 0 if the property with the given name is not present.
Example:
domain tcamnt salary
long property.node
long ret
ret = 0
property.node = getNamedProperty("salary")
if property.node <> 0 then
salary = val(getPropertyValue(property.node))
|* Create/update salary record
select txppl001.*
from txppl001 for update
where txppl001.emno = :bpmdm001.emno
as set with 1 rows
selectdo
ret = dal.change.object("txppl001")
dal.set.field("txppl001.sala", salary)
selectempty
ret = dal.new.object("txppl001")
dal.set.field("txppl001.emno", bpmdm001.emno )
dal.set.field("txppl001.sala", salary)
endselect
ret = dal.save.object("txppl001")
if ret <> 0 then
dal.set.error.message(sprintf$(
"@Cannot store salary for employee %s; error %d",
bpmdm001.emno, ret))
return(DALHOOKERROR)
endif
endif