Form Close automatically after showing ERROR dialog

jigneshdhandhajigneshdhandha Member Posts: 41
Hi All........

I want to make Validation on Status Field on Sales Order.
When I moving One Sales Order to Another I am Checking Sales Order Status = Released and IF Status is not Released then
It will Give an error and After that user can change Status = released

But When I got error and after pressing ok then sales order form is closed I dont want to close Sales Order Form.

and I also put message instead of error but through message sales order is not closed but record move to next record. This i dont want to do.

Thanks..............

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    May I know where did you write code and what code?
  • jigneshdhandhajigneshdhandha Member Posts: 41
    Hi Mohana..

    I am Writing Code on OnQueryCloseForm this is done Perfectly.
    When Status is not Released The Form is not Close till Status is not become released.

    I also Write Code on OnNextRecord Trigger and OnBeforePutRecord But When I move to One Sales Order to Another and If First Sales Order Status is Open then Error Show and Form is Closed. But Don't Want to Close the Form.

    I am Also Try on Onafterrecord and Onaftergetcurrrecord....
  • krikikriki Member, Moderator Posts: 9,112
    I also Write Code on OnNextRecord Trigger and OnBeforePutRecord But When I move to One Sales Order to Another and If First Sales Order Status is Open then Error Show and Form is Closed. But Don't Want to Close the Form.

    I am Also Try on Onafterrecord and Onaftergetcurrrecord....
    If you have an error in those triggers, the form will close. In some triggers you can have errors without the form closing, but in some you can't have them. The documentation on the triggers also states what happens to the form in case of error.

    The easiest is on the OnQueryCloseForm()-trigger.
    Check the persons orders and if you see an order that should be released, give a message (NOT an error), position to that order and return FALSE so the form does not close.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.