"No. Series" error in Navision 3.7

sizzlingUK
Member Posts: 4
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
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
-
Thsi may be because of code on onopenform() ? do u have any code on onopenform like filtergroup , setfilter, etc????LR0
-
Hi Lakshmi,
Thanks for reply but I have checked there is no code or filters on onopenform() trigger.
Thanks
sizzlinguk0 -
Turn on the debugger and run the form. Step through it and debug it.
I'm sure it's a bug somewhere.
Good luck0 -
Making numbering series work in new functionality is a little tricky. You should take a Cronus database and debug the process of creating a new Item. When you understand all the steps, you go back to your own code and you will find where this needs to be modified.0
-
Thanks everybody. The error is solved now. what I did is, I deleted all tables and forms and created new from scratch. It worked. Don't know what was the error.
Thanks
sizzlingUk0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions