Restricting Quote Revisions on Closed (Already Revised) Quotes

Restricting Quote Revisions on Closed (Already Revised) Quotes

Post by Scott Moor » Sun, 15 Apr 2007 03:45:40


I have a situation where I need to prevent users from revising quotes
that are closed to a new revision. A scenario would be that a user
creates and then activates a quote. Next, they close the quote as
revised and then activate the revision. Now, if the user goes back to
the original quote and clicks on the actions menu they have the option
to revise the quote. This is what I want to prevent. Performing this
operation creates an entirely new quote id with a revision number of
0. If they activate the quote then they end up with 2 seperate quote
id's underneath an opportunity (if opps are being used) with the same
dollar value and quoted items.

As a solution, I would like to remove the "Revise Quote" option from
the actions menu of the quote. I think this will work since active
quotes can be revised by clicking the "Close Quote" option from the
actions menu. Since the "Close Quote" option is not available
underneath the actions menu of a closed quote, this would essentially
remove the user's ability to revise already closed quotes.

So the question is:
1) Does anyone know if it is possible to remove the a menu option in
the quotes action menu?
2) Does anyone have any suggestions on a better way of doing this?
 
 
 

Restricting Quote Revisions on Closed (Already Revised) Quotes

Post by TWF0dE5 » Mon, 16 Apr 2007 11:42:02

You could add an OnLoad script to the quote form that checks the status of
the quote and then, if it is revised, remove the menu item. You'd have to
find the elementid for the menu item. This is a script I used to remove the
'Resolve Case' option from the menu on a case form unless the statuscode was
at a certain setting, so you might use this as a model:

if (crmForm.all.statuscode.DataValue != "12" &&
/*form type 2 is an update form */
crmForm.FormType == 2)
{
document.getElementById('_MIresolve').Style = 'display:none';
}

First, you'll need to find out what the statuscode is of a quote that has
been revised, and then look at the quote record's source code to find the
elementid of the menu item you want to hide.
--
Matt Wittemann, CRM MVP
http://www.yqcomputer.com/