Error Message is vanished

Kranthi Rohit
Tera Contributor

I wrote a BR on contract table, I used set abort action and added error message to stop the record creation. while testing this, the error message is disappearing in fraction of seconds. can any one help me on this. thanks in advance!

3 REPLIES 3

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

There are 2 things that possibly cause this.

  • The page is getting reloaded which causes the error to vanish
  • there is some ui policy or client script that is clearing all messages on the form.

 

Try to find what is happening in your case.

-Anurag

Thanks for your response!

It looks like reload issue. my code is:

current.u_billing_frequency != 'monthly' && current.contract_model != 'block hour';

    gs.addErrorMessage('Contract cannot be submitted: Contract Period Type must be Monthly and Contract Model must be Block Hour.');

    current.setAbortAction(true);

this is before business rule 

Where is this query running form ? Looks like a br . 

Is this a  before BR? If so then this should run before the transaction and so the page should not reload. Trey to change the Order of the BR.

Can you change this logic to sit on a client script ? 

-Anurag