Skip to Content
author's profile photo Former Member
Former Member

how to force the form.MODE to fm_UPDATE_MODE?

I am working in the "after action event/ et_CLICK", after adding a new record (that is duplicated) very quickly it shows me the error of "DUPLICATE KEY", but the from is in OK_MODE.

how can I force to that after finding an error, be in UPDATE_MODE and NOT in OK_MODE.?

the parameter BubbleEvent, alone it works for the Before_action = True.

Thanks.

Jorge

Message was edited by: Jorge Benitez

Message was edited by: Jorge Benitez

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jan 26, 2005 at 07:33 AM

    Have you tried to set the value of the form Mode to Update in the After Action event?

    form.Mode = fm_UPDATE_MODE

    Trinidad.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 26, 2005 at 01:34 PM

    You could update one of the fields on the form with it's own value to get Business One to put the form into Update mode. Basically, this is simulating a user keypress.

    My approach would be to read the value from any one of the edit text fields on the form, then clear the field. Next would be to use Application.SendKeys to put the data back into the field. As a result, the form will be in update mode.

    I think that this approach is more reliable than forcing the form into Update mode by modifying it's mode property directly, as I have run into some problems with form state when doing that.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.