Greeting everyone
i've created a new form with that now i'm trying to change the statues on that form so i've created a new enum
and i've crated action menu for every status as you see here below
also i've created class for those actions
static void main(Args _args) { GovernmentIdTransStatus governmentIdTransFlow; GovermentIdTrans argsGovermentIdTrans, govermentIdTransTmp; FormDataSource fds; if (_args.record().TableId == tableNum(GovermentIdTrans)) { argsGovermentIdTrans = _args.record(); if (_args.parmEnumType() != enumNum(GovernmentIdTransStatus)) { throw error("@SYS104799"); } governmentIdTransFlow = _args.parmEnum(); ttsBegin; govermentIdTransTmp.SubmitStatus = governmentIdTransFlow; govermentIdTransTmp.doUpdate(); ttsCommit; fds = argsGovermentIdTrans.dataSource(); fds.research(true); } else { throw error("@SYS104799"); } }
when i pressed on anyone of those status i've got error message
Cannot edit a record in GovermentIdTrans (GovermentIdTrans).
The record has never been selected.
how can solve this problem?