Customer Code Modification Prevention

fredlosbanosfredlosbanos Member Posts: 6
Hi All,

Is there a way that we can prevent users from modifying the customer code especially if there are posted transaction for that customer.

Thanks,
Fred

Comments

  • matttraxmatttrax Member Posts: 2,309
    You should handle this through permissions. If you don't want them modifying records don't give them modify permissions for that table.

    If they legitimately need to modify records and are renaming them, then they need better training. You get a prompt when you try to rename a record and they shouldn't be clicking Yes on it unless they are really supposed to.
  • Cali_KoppersCali_Koppers Member Posts: 19
    I'm assuming that Customer Code is a custom field in the customer table. I'm guessing you want field level security. You can add a boolean field called Modify Customer Code User Setup table. In the OnValidate trigger of the Customer Code, you can write code along the lines of:

    UserSetup.GET(USERID);
    UserSetup.TESTFIELD("Modify Customer Code");

    Note: You should at least define UserSetup as a local variable to the OnValidate trigger of the Customer Code field in the customer table. This way, only users with a check on the Modify Customer Code in the User Setup table.
  • SavatageSavatage Member Posts: 7,142
    You should handle this through permissions. If you don't want them modifying records don't give them modify permissions for that table.
    Easier said than done. Cause they should be able to edit an address, phone , etc.
    You get a prompt when you try to rename a record and they shouldn't be clicking Yes on it unless they are really supposed to.
    \:D/ Perfect world & Perfect Users

    How we did it was two little changes.

    In the S&R Setup table we added a new field called "Block Rename of Customer No." type boolean.
    Added to the S&R Setup form - where permissions decide who can access this form or not.

    On The Customer Table...
    OnRename()
    SalesSetup.GET;
    IF SalesSetup."Block Rename of Customer No." THEN
    ERROR('You are not allowed to rename Customers');

    This allows us to stop changes made in error. But also allows to turn it off if we ever need to.
  • Cali_KoppersCali_Koppers Member Posts: 19
    Savatage wrote:
    You should handle this through permissions. If you don't want them modifying records don't give them modify permissions for that table.
    Easier said than done. Cause they should be able to edit an address, phone , etc.
    You get a prompt when you try to rename a record and they shouldn't be clicking Yes on it unless they are really supposed to.
    \:D/ Perfect world & Perfect Users

    How we did it was two little changes.

    In the S&R Setup table we added a new field called "Block Rename of Customer No." type boolean.
    Added to the S&R Setup form - where permissions decide who can access this form or not.

    On The Customer Table...
    OnRename()
    SalesSetup.GET;
    IF SalesSetup."Block Rename of Customer No." THEN
    ERROR('You are not allowed to rename Customers');

    This allows us to stop changes made in error. But also allows to turn it off if we ever need to.

    How do you specify which user has permission doing it this way?
  • SavatageSavatage Member Posts: 7,142
    you can specify which users have access to the setup tables & forms thru permissions.

    or you can not tell them that the checkbox exists in the setup :lol:
  • fredlosbanosfredlosbanos Member Posts: 6
    Savatage wrote:
    You should handle this through permissions. If you don't want them modifying records don't give them modify permissions for that table.
    Easier said than done. Cause they should be able to edit an address, phone , etc.
    You get a prompt when you try to rename a record and they shouldn't be clicking Yes on it unless they are really supposed to.
    \:D/ Perfect world & Perfect Users

    How we did it was two little changes.

    In the S&R Setup table we added a new field called "Block Rename of Customer No." type boolean.
    Added to the S&R Setup form - where permissions decide who can access this form or not.

    On The Customer Table...
    OnRename()
    SalesSetup.GET;
    IF SalesSetup."Block Rename of Customer No." THEN
    ERROR('You are not allowed to rename Customers');

    This allows us to stop changes made in error. But also allows to turn it off if we ever need to.


    Thanks all for your replies. I'll try this one then I'll post again what ever will be the outcome..

    Thanks again...
  • fredlosbanosfredlosbanos Member Posts: 6
    Savatage wrote:
    You should handle this through permissions. If you don't want them modifying records don't give them modify permissions for that table.
    Easier said than done. Cause they should be able to edit an address, phone , etc.
    You get a prompt when you try to rename a record and they shouldn't be clicking Yes on it unless they are really supposed to.
    \:D/ Perfect world & Perfect Users

    How we did it was two little changes.

    In the S&R Setup table we added a new field called "Block Rename of Customer No." type boolean.
    Added to the S&R Setup form - where permissions decide who can access this form or not.

    On The Customer Table...
    OnRename()
    SalesSetup.GET;
    IF SalesSetup."Block Rename of Customer No." THEN
    ERROR('You are not allowed to rename Customers');

    This allows us to stop changes made in error. But also allows to turn it off if we ever need to.


    Thanks all for your replies. I'll try this one then I'll post again what ever will be the outcome..

    Thanks again...



    Hi Savatage, =D>

    Your suggestion was successful. We can now control the modifcation of customer code.

    Many thanks,
    Fred
  • SavatageSavatage Member Posts: 7,142
    great to hear. we also did that form item # & vendor code too.
Sign In or Register to comment.