New code field, text field and no series setup

KisuKisu Member Posts: 381
Hay guys,
I'd need to make 2 new fields on Sales Quote and Sales Order Forms,
The fields should be:
"Site", Code, 15
and
"Description", Text, 30

the code field should be listed in No. Series list, it would have to be drill down capable and it should populate the Description field that is connected to the code after form change/drilldown etc.

I made the fields for the Form but I'm not sure how'd I link the fields for No. Series. The source table is Sales Header.

Any help with this matter ^ö.ö^

Edit: Seems like I'd have to do some coding for On validate trigger under the "Site" field.
Maybe some point similar to the Sell-to Customer No. field, it does quite same I think.
K.S.

Comments

  • KisuKisu Member Posts: 381
    Been thinking this a little more, but still some coding help would be appreciated :oops:

    I noticed that Sales forms use table 311 for setuping the Nos. for the other forms Like the Customer No.'s. I've been thinking should I add lookup fields for the Sales & Receivables Setup Form for setting up the No. Series.

    I cant think of simplier method to do this, even its just 2 new fields I would have to edit atleast these o.O

    the Sales Quote form (adding the fields which I'd need and setting the C/AL? for the "Site" field so it would populate the description)
    Sales & Receivables Setup Table and Form (adding fields for entering the Nos. and records to setup the No. Series)
    Sales Header Table (Adding the record relation for the Sales Quote form)

    :shock:
    K.S.
  • SLF25SLF25 Member Posts: 37
    You can check how No. Series are assigned on Sales Orders for instance. Check AssistEdit function on the Sales Header table and the OnAssistEdit trigger on the Sales Order form, NoSeries field. Some coding is needed.

    I've read your post again, I guess that's not what you are asking, but I don't understand your problem.
  • KisuKisu Member Posts: 381
    SLF25 wrote:
    I've read your post again, I guess that's not what you are asking, but I don't understand your problem.

    I just need those 2 fields on the sales quote form and the code field's should follow the serial numberings and could be set up like other serial numberings
    K.S.
  • remco_rauschremco_rausch Member Posts: 68
    Does it have to be a drilldown? Why not just put a table relation on the new field to the no. series table? To populate the description either

    a) put some code on validate on the site field i.e.:

    IF NoSeries.GET(Site) THEN
    Description := NoSeries.Description
    ELSE
    ERROR('Invalid Site Code');

    b) make the description field a flowfield with a CalcFormula of
    Lookup("No. Series".Description WHERE (Code=FIELD(Site)))

    Also don't forget that the no. series table code is 10 chars long (as standard) unlike your site field.
Sign In or Register to comment.