Can't Modify Database From Trigger

headley27headley27 Member Posts: 188
C/AL makes me crazy ](*,)

I am trying to modify the database using Rec.MODIFY from the 'Form - OnNextRecord(Steps : Integer) : Integer' but I receive the message 'You cannot make any changes in the database from this trigger.'

'Form - OnBeforePutRecord()' which has a description of 'The C/AL code in this trigger is executed before a record is saved. ' gives me the same message.

I simply want to clear a couple of fields if a certain criteria is met, before leaving a record displayed in the Sales Quote Form.

This would be required on insert of a new record, on close of the form, choosing the next record, choosing the previous record, etc.

Is there a standard way of doing this? I am using 3.7A.

Any help is greatly appreciated. Thank you.

Answers

Sign In or Register to comment.