Hi All,
I am facing problem with "No. Series". I have created one table whose primary key is "Change Request No.". I am trying to set no. series on it. I have set the series in the no. series table as CRN001 to CRN999 and set Default Nos. as True. I have also created setup table with Change request no. as a field.
I have written the following code:
OnValidate trigger:
IF "Change Req. No." <> xRec."Change Req. No." THEN BEGIN
GetChngMgtSetup;
NoSeriesManagementCU.TestManual(ChangeMgtSetup."Change Request Nos.");
"No. Series" := '';
END;
onInsert Trigger:
IF "Change Req. No." = '' THEN BEGIN
GetChngMgtSetup;
ChangeMgtSetup.TESTFIELD("Change Request Nos.");
NoSeriesManagementCU.InitSeries(ChangeMgtSetup."Change Request Nos.",xRec."No. Series",0D,"Change Req. No.","No. Series");
END;
I have created the following function and called it on the onAssistEdit() trigger of the field.
AssistEdit() : Boolean
GetChngMgtSetup;
ChangeMgtSetup.TESTFIELD("Change Request Nos.");
IF NoSeriesManagementCU.SelectSeries(ChangeMgtSetup."Change Request Nos.",xRec."No. Series","No. Series") THEN BEGIN
NoSeriesManagementCU.SetSeries("Change Req. No.");
EXIT(TRUE);
END;
Now, when I try to run the form, it gives me error saying "No. Series CRN001 does not exist". When I see the record in the table this no. is saved but does not allow me to open the form again.
Could anyone please help me on this?
Thanks
sizzlingUK
0
Comments
Thanks for reply but I have checked there is no code or filters on onopenform() trigger.
Thanks
sizzlinguk
I'm sure it's a bug somewhere.
Good luck
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
RIS Plus, LLC
Thanks
sizzlingUk