Hai,
Can anyone tell me how I can generate number sereies ? I like to get some codes for the same. I have already added the necessary fields in the Sales & Recievables Setup screen and table . Only my code is not working. I dont have any document type as it is there in Sales Header. So Iam a bit confused.
Any help would be appreciated.......
0
Comments
"Labour Contract Series No." is a code of 10, with Table Relation property set to "No. Series".Code
NoSeriesManagement is an CU of the same name.
NoSeriesManagement.GetNextNo(
Your Series Code,
Date (this date is going to be saved as the date of last assigned No.),
dose it have to save the number as used (IF No then this number is still able to be taken.) );
I hope it will help You.
OnInsert:
OnValidate-No.
You must just change "customer Nos." on your New Nos.
From where i will get this "No.Series" ?? Do I have to add another field in my table with a lookup to the sales & Recievables setup? Please do advice.....
1.
"No. Series" Code 10 with tablerelation to table "No. series" in Your table which have to be numbered.
2.
"New Table Nos." code 10 with tablerelation to table "No. series" in setup table.
Use "new table Nos." instead "customer Nos.". That's all if you have table with one field primary key.
I have implemented everything as per the instructions . The number is getting incremented but it is not getting displayed in the field. Do u know wht is the issue?? Do I have to write any code in AssistEdit().
You know the number is incremented but You dont see it? :-k
You look at value of "No." field?
Do you write code in table? or in form?
I can help You if You Paste Your code and what is the primary key of your table.
My Primary Key is No I have written my code in table. My code looks like below :
OnInsert() :
IF No = '' THEN BEGIN
SalesSetup.GET;
SalesSetup.TESTFIELD(TomNo);
NoSeriesMgt.InitSeries(SalesSetup.TomNo,xRec."No.Series",0D,No,"No.Series");
END;
No - OnValidate() :
IF No <> xRec.No THEN BEGIN
TomSetup.GET;
NoSeriesMgt.TestManual(TomSetup.TomNo);
END;
This is what I have written. "No.Series" have implemented as per your instructions. Iam not sure what I have to write it in AssistEdit(). TomNo is the name I have given in the Sales & Recievables Setup.
AssistEdit():
WITH RecHeader DO BEGIN
COPY(Rec);
SalesSetup.GET;
IF NoSeriesMgt.SelectSeries(SalesSetup.TomNo,OldRecHeader.No,No) THEN BEGIN
NoSeriesMgt.SetSeries(No);
END;
In the above code RecHeader is the record variable of my table where the number series should be implemented. To be frank OldRecHeader I just duplicated the same after going through sales Header number series code. Iam not sure about this.
Also I have written the following code in my Header form :
No - OnAssitEdit() :
IF AssistEdit(xRec) THEN
CurrForm.UPDATE;
Hope you can rectify my mistakes. Thanks in advance......
END;
Code in insert and validate is good. Should work.
Thanx a lot dude. Its working fine. Thanx again for your valuable time.
Sorry about the previous post... posted it by mistake.