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.
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:
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.
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.
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?
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..
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.
Comments
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.
My Blog - nav.education
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.
\: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.
http://www.BiloBeauty.com
http://www.autismspeaks.org
How do you specify which user has permission doing it this way?
or you can not tell them that the checkbox exists in the setup
http://www.BiloBeauty.com
http://www.autismspeaks.org
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
http://www.BiloBeauty.com
http://www.autismspeaks.org