Customer Card

SiriKogantiSiriKoganti Member Posts: 56
edited 2010-05-12 in Navision Financials
Hi All,

Is there any way to restrict users with out entering the salesperson code.

Because, we track sales based on the salesperson code. some users they are entering customer card without salesperson so those sales are not coming in to the sales report.

Thanks,

Comments

  • SavatageSavatage Member Posts: 7,142
    Your talking about making Salesperson Code in the Customer Table mandatory.

    You will need to add code to do this, do you have a developers license?
    If so, then onInsert of the customer table make Blocked=true.
    then Onvalidate of the blocked field add
    IF NOT Blocked THEN BEGIN
    TESTFIELD("your mandatory field#1");
    TESTFIELD("your mandatory field#2");
    etc, etc,
    END;

    this way the customer cannot be used until somebody unchecks the blocked field and in doing so, will trigger the checks on the fields you need to have filled in. Don't forget Not Blank to YES on all thesde fields too.

    if not, the best you can do then is to set the property of the field NOT BLANK = YES
    and if you wish set the Property "InitValue" to a house acct or default salesperson code.

    Then someone will be able to change it to the correct code but they will never be able to clear it.

    Save->Compile->Enjoy!
  • austinaustin Member Posts: 191
    Hi Savatage,

    Could you explain what is the Use of Not Blank property in the Real time ?

    Thanks in advance.
  • SavatageSavatage Member Posts: 7,142
    For future reference..
    goto any card - View->Designer
    Right Click on any field->Properties
    Look at the property you have a question about, click it with your mouse
    Hit F1
    NotBlank
    Use this property to force the user to make an entry into this field, if the user has selected this field.

    Applies to
    Fields, text boxes

    Comments
    If you want to force the user to make an entry into this field before saving the record to the database, use the OnBeforePutRecord trigger for that purpose.

    You can use this property together with the InitValue property to make sure an entry is made into this field. The system checks this setting for both the control and field during validation.

    The only problem with this is that if the field is never clicked on/entered then it doesn't work. Hence the other solution.
Sign In or Register to comment.