Preventing a quote from being converted into an Order via a CRM Script

lock
push_pin
done
Answered
1

Hi,

A customer has asked us to do some scripting, so that when a new company is added, it is added with a status of Unapproved (and possibly linked with SAINT show some kind of unapproved image on the company card).  When the rep has done all the due dilligence checks, and attaches all relevant documentation to the customer record supporting these checks, then have them click a menu item on the task menu to send an email to an "Approver" SuperOffice user to approve the company.  This email would have a hypelink to the company record, which the approver could open, and select another option on the task menu to approve or deny the company.

All of the above I can do with CRM script.  But they want users whilst the company is in an unapproved state, to be able to raise quotes and opportunities, but not be able to select the "Place Order" button on the quote until the account has been approved.

I have looked at the "Before saving quote" event with the test code below.

EventData ev = getEventData();
ev.setBlockExecution(true);
ev.setMessage("Test");

But this seems to only fire on the quote record when you click the "Close" button, not when you click the "Send" or "Place Order" buttons, which will also perform a record save, and even when running on the close button, does not run the setBlockExecution line of the code.

I also thought that maybe I could set in the backend the status of the quote to require approval on save to get round the problem that way, but they still want the users to be able to send the quote and create new revisions of the quote, just not convert it into an order, which is not the way the built in quote approval system works.

Is there any possible way around this, with the current scripting events available?  I know we could probably achieve this with a custom quote connector, but that does seem a bit of an overkill for what we need to do.

Many thanks,

Trevor

20 h, 11 m ago | 02:26 PM

All Replies (1)

Hi Trevor,

We have hit this issue multiple times before, sadly the quote module is missing some possibilties regarding this. See:

 

https://community.superoffice.com/en/product-releases/bugs-wishes/product-issue/?bid=91755&azure=1

https://community.superoffice.com/en/product-releases/bugs-wishes/product-issue/?bid=10779&azure=1

https://community.superoffice.com/en/product-releases/bugs-wishes/product-issue/?bid=112826&azure=1

 

20 h, 4 m ago | 02:33 PM

Hi David,

I thought that is what you might say, but thanks for confirming, I will not spend any more time on this (apart from following the wishes 😊).

Thanks again,

Trevor

16 h, 1 m ago | 06:35 PM

Add reply