We had a similar requirement where we wanted to restrict the changing
of pricing on Sales Orders to specific users. I ended up adding a
customisation using the BeforeFieldChange Event and the following
code:
Select Case args.Column.ColumnName
Case "SalesUM"
if args.Row("SalesUM").ToUpper() <> args.ProposedValue.ToUpper()
and SalesOrderForm.Session.UserID <> "manager" and
SalesOrderForm.Session.UserID <> "(UserID)" and
SalesOrderForm.Session.UserID <> "(UserID)" then
messagebox.show("You do not have permission to amend this
field." + chr(13) + "Please change it back.", "Error.",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Throw new UIException()
end if
Case "DocUnitPrice"
if args.Row("DocUnitPrice") <> args.ProposedValue and
SalesOrderForm.Session.UserID <> "manager" and
SalesOrderForm.Session.UserID <> "(UserID)" and
SalesOrderForm.Session.UserID <> "(UserID)" then
messagebox.show("You do not have permission to amend this
field." + chr(13) + "Please change it back.", "Error.",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Throw new UIException()
end if
Case Else
End Select
I had to use specific user IDs as I couldn't find a way to use
Security Groups.
HTH,
Nigel.
of pricing on Sales Orders to specific users. I ended up adding a
customisation using the BeforeFieldChange Event and the following
code:
Select Case args.Column.ColumnName
Case "SalesUM"
if args.Row("SalesUM").ToUpper() <> args.ProposedValue.ToUpper()
and SalesOrderForm.Session.UserID <> "manager" and
SalesOrderForm.Session.UserID <> "(UserID)" and
SalesOrderForm.Session.UserID <> "(UserID)" then
messagebox.show("You do not have permission to amend this
field." + chr(13) + "Please change it back.", "Error.",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Throw new UIException()
end if
Case "DocUnitPrice"
if args.Row("DocUnitPrice") <> args.ProposedValue and
SalesOrderForm.Session.UserID <> "manager" and
SalesOrderForm.Session.UserID <> "(UserID)" and
SalesOrderForm.Session.UserID <> "(UserID)" then
messagebox.show("You do not have permission to amend this
field." + chr(13) + "Please change it back.", "Error.",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Throw new UIException()
end if
Case Else
End Select
I had to use specific user IDs as I couldn't find a way to use
Security Groups.
HTH,
Nigel.
--- In vantage@yahoogroups.com, "sgotschall" <sgotschall@...> wrote:
>
> Vantage 8.03.407 on Progress
>
> I would like to set security to prevent people from changing the
credit
> limit or credit hold status on a customer but I want them to be
able to
> view this information in Customer Maintenance.
>
> I know I could customize the form to make the fields Read Only, but
> that would require me to make a different form for those people who
are
> allowed to change this information. Anyone have an easier way of
doing
> this?
>