Tech Support > Microsoft Windows > Windows CRM > TASK: required field value when task is beeing completed
TASK: required field value when task is beeing completed
Posted by Karmel on August 2nd, 2006


Hello,
I'd like to prevent saving task record as completed if a specific field
(eg. resultcode) is empty.
I've created new field "Result code" which should be filled out by the
user when he push "Save as completed" button.

In customize forms -> Task -> Form properties ->events -> OnSave
I can check if <crmForm.all.new_resultcode.SelectedText> is empty or
not
but this field should not be obligatory when the task is Open.
I'd like to display alert if resultcode is empty only when user click
button "Save as completed".

Even when I check crmForm.all.statecode after "Save as completed" the
value read from crmForm is always Open bacause OnSave event is called
before saveing data.

How to recognize that the task is just before completeing to check if
resultcode is not empty?


best regards
Karmel