[Vtigercrm-developers] aborting a save in an event handler

Joe Bordes joe at tsolucio.com
Tue Oct 16 08:13:51 PDT 2012


You CAN do this with AJAX. Both asynchronous and synchronous ajax calls.

As Conrado (Re-Ingenia) has well stated you have an example in the 
Account duplicate validation. Study that code and you will be able to 
what you need.

Joe
TSolucio


On 16/10/12 17:01, Alan Bell wrote:
> On 16/10/12 15:46, Joe Bordes wrote:
>> Why can't you do the validations on the client side?
>>
> the validation is something along the lines of "does this account have
> any other orders that are on trial pricing" so it has to do a database
> query based on information that isn't present in the UI, and I can't do
> it before creating the sales order because I don't know what account
> they are going to choose. It would have to be an AJAX kind of call to do
> it before the submit - which isn't impossible, I am just trying to use
> the framework and an event handler seemed to be the right place to put
> the code.
>
> Alan.
>



More information about the vtigercrm-developers mailing list