views:

136

answers:

0

Hi,

I need to do the following:

In Crm, you have serviceappointments (serviceactivities). 1 appointment can have a state, ( like arrived, pending, closed, ... ). When i save the form (onsave event), It should catch if the form is putted closed state and then it should do something.

I can get the state easily:

alert(crmForm.all.statuscode.DataValue)

I hanged this onto an onsave event. But when i put a serviceappointment into closed state, it first calls the onsave event with previous state and then puts it in closed state.

Is it possible to catch if it's putted in closed state?