Class: Record
Description
This method informs the compiler that the object being used cannot update a record; it can only be used to insert a record. When you use the setCreateOnly method, the compiler generates code around the save and bypassSave methods that will return a runtime error if an update to the record is attempted.
Syntax
objectName.setCreateOnly()
Parameters
None
Returns
Void
When Became Available
Profile v6.0
Example
type Number CID = 1000000034
type RecordLNCPN lncpn=Class.new(“RecordLNCPN”)
do lncpn.setCreateOnly()
set lncpn.pnd=%SystemDate
set lncpn.cid=CID
do lncpn.bypassSave()