Now I have no error on method, but the form is closed and saved record, in my scenario I want to prevent of closing form just new record and clear values
closedOK = false;
I think you are using a command button (OK). Try using a normal button.
I changed the command of my button to normal button and now the form is saving the records and the form its not being closed which is perfect, but it is not clearing the field values after clicking the button.
What should I do!
You may have to clear them explicitly in your code.
Example → identification_ProductNumber.text(’’); // take the control name and set the value.
If the product number is auto generated, you should also trigger the code to generate the product number and item id.
when I click the button for the first time all fields are saved and cleared but when I try for the second time record is not be
ing save, I am geting an error (Cannot create a record in Product number (EcoResProductIdentifier). Product number: 150193.
The record already exists.)
Are you assigning the new product after clearing the values? Start looking at, \Forms\EcoResProductCreate\Methods\write
I stuck in this case , could you be more specific on how to assign the new product after clearing the values.
Try by calling, initNumberSequences method after creating new record and clearing the values.
If you still see the issue have a look at, \Forms\EcoResProductCreate\Methods\setProductNumber