Assigning No. Series to the field

sridhar
sridhar Member Posts: 171
I have created a new Table say "Users". The primary key is No.

I have included a new field say "User Nos." in the Sales & Receivable Setup table.

Then I have written code in OnInsert() trigger of the "Users" and in OnValidate() of the No. field.

Then I dont know what else I have to do to assign No. series to that field.

Comments

  • Marije_Brummel
    Marije_Brummel Member, Moderators Design Patterns Posts: 4,262
    The table needs to have a function called AssistEdit

    This needs to be activated in the AssistEdit trigger on the form.

    Look at Table 27 (Item) and Form 30 (Item card) For an example
  • sridhar
    sridhar Member Posts: 171
    Yes Mark Brummel,

    I have defined a function called AssistEdit and I have writted code in that trigger also.

    When I tried to tab out the No. Field in the card form I m getting the following error

    Error : " You must specify Deposit Nos. in Sales & Receivables Setup Primary key="
  • Marije_Brummel
    Marije_Brummel Member, Moderators Design Patterns Posts: 4,262
    And? Have you specified this number series in the sales setup table?
  • sgg
    sgg Member Posts: 109
    edited 2006-01-11
    U could check the Customer Table for example.

    U will also need to add codes such as the following as found in the OnInsert Trigger of the Customer Table.


    IF "No." = '' THEN BEGIN
    SalesSetup.GET;
    SalesSetup.TESTFIELD("Customer Nos.");
    NoSeriesMgt.InitSeries(SalesSetup."Customer Nos.",xRec."No. Series",0D,"No.","No. Series");
    END;


    This is Given the Fact that you already added a field Called "No. Series" to your Table.
    Sunday, Godwin G
  • sridhar
    sridhar Member Posts: 171
    I have included a new field "User Nos." that will have Table Relation property set to "No. Series"
  • sridhar
    sridhar Member Posts: 171
    Yes Sgg I exactly did what you said
  • sgg
    sgg Member Posts: 109
    on the Form,

    the add the following codes to the No. - OnAssistEdit trigger
    IF AssistEdit(xRec) THEN
    CurrForm.UPDATE;
    Sunday, Godwin G
  • Marije_Brummel
    Marije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Somewhere in your code is some relation to the Deposit Nos in the Sales & Receivables Setup

    You have to look this up and change it to your new setup field.