AnsweredAssumed Answered

Go to field in portal during validation - how?

Question asked by EmelieLeht on Apr 30, 2014
Latest reply on May 2, 2014 by EmelieLeht


Go to field in portal during validation - how?


     Hi guys,

     I've been tearing the forums apart for answer but can't seem to be able to find a solution. Hope someone can help out.

     I have a layout from which I am creating related records through a portal. These records represent a stock withdrawals of articles and the amount to of articles to be withdrawn. I have a validation on the amount to check that the amount is lower than the current stock which kicks in by the trigger OnObjectValidate. When this criteria fails I just want to be sent back to the amont-field to enter a new one, but somehow I cant get this to work.

     Right now my validation script shows a custom dialog from which you can choose to set the amount to mamximum available or enter a custom value. To enter the maximum value by a SetField works fine but with the custom value I can't get back to the amount field with teh GoToField fuction. I only seem to end up in the las field I clicked in.

     How can I make my script return to the amount-field for a new entry?

     Also, remember that all this is done throug a portal, I know that there might be issues with that but I think the GoToField should work within the portal to.

     Finally, I have tried the basic validation set in the field options, this is not working either since it's just sending me back to the top record in the portal when validation fails.

     Any suggestions are most welcome!