Hi,
I've put a good deal of code into the Account form to disable the majority
of the data fields in the Account form when the Account becomes a "Customer"
(CustomerTypeCode = "3" or "Customer"). In order to edit these fields,
certain users are able to "unlock" the form by entering a password into a
JScript input box. Once the record is saved (and the page reloads), the
OnLoad event disables these fields again. This works fine in all but one
situation.
When a user edits multiple records using the "Bulk Edit" feature in the
Account form, the JScript customizations we've put in place to "Lock Down"
the Account is not able to recognize Accounts with a CustomerTypeCode = "3".
This is due to the fact that the Bulk Edit form (crmForm.FormType = 6) will
not retrieve any data from the selected records from the Account grid view in
the OnLoad event, and the logic in my code is by-passed.
Thus, the user may update any field on the Account form, and on the form's
OnSave event, CRM will then write the updated information back to the
database on the selected records, including those with a CustomerTypeCode =
"3". Of course, this cannot be allowed to happen, as anyone will be able to
update Customer Records.
I know that there is a code sample in the SDK to determine the GUIDs of the
selected records from the Account grid.
But once I retreive this information, how might I do the following:
1.) Determine which records in the CRM Filtered Account view have a
CustomerTypeCode of "3" (Customer), then
2.) Prevent the data updated on the Bulk Edit form from updating these
"Customer" records in the database.
If #2 proves to be too difficult, I believe I can simply alert the user that
"one or more records are 'Customer' records" and stop the Save() event, which
would suffice.
I'd disable the entire form for crmForm.FormType = 6, but Accounts with any
other CustomerTypeCode should be available to bulk edit.
The client is VERY adamant about restricting the users from updating Account
Customers, and this needs to be solved quickly. Any ideas would be
appreciated.
And, no. Unfortunately, they refuse to purchase c360's Field Level Security.
:-(
Has anyone had
--MD