StephenWonfor

Get(RecordOpenState) Question

Discussion created by StephenWonfor on Jul 4, 2018
Latest reply on Jul 12, 2018 by Norsult

When I run this as a script trigger (OnRecordLoad) I often get a "user is modifying this record" type of error.  I had thought that Get(RecordOpenState) = 0 meant the record was committed and saved.

 

Commit Records/Requests [ Skip data entry validation ; With dialog: Off ; Force Commit ]

If [ Get(RecordOpenState) = 0 ]

     Set Variable [ $SetupData ; Value: TextStyleAdd("Course: ";Bold) & COURSES::CourseName...

     Set Field [ COURSES::CourseSummary ; "Updated: " & Get(CurrentTimestamp) & "¶-----¶" & $SetupData ]

End If

 

FMHelp says that 0 is for a closed (committed) record.  Is there a different value for 0?

 

Puzzled! or maybe just missing something obvious.

Outcomes