Showing results for 
Search instead for 
Did you mean: 

Prevent Pop Up when Datasource of Form Changed In Code manually

Former Member
0 Kudos

Hi All,

I am working on UDO Form now, and I have to set the value on DBDatasouce/UserDatasource (Default Values) but I wouldn't like user to see the pop up alerting user: "Unsaved data will be lost. Do you want to continue without saving".

Is there any way I can prevent this from happening as the form is not changed by the user.

I have tried, form.Refresh(), form.ResetMenus(). with no luck.

It would be great help if there is a way, its annoying to the user.

Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor
0 Kudos

Hi Bikram,

Try something like this:



Form.DataSources.DBDataSources.Item(YOUR_DATASOURCE_NAME).InsertRecord(0); //Open a null record in your datasource



Hope it helps.

Best regards,

Diego Lother

View Diego Lother's profile on LinkedIn

Former Member
0 Kudos


Thanks for the reply, is there any other way with doing update, as my form is in add mode.

Active Contributor
0 Kudos

Hi Magar,

If you are sure nothing is changed set the mode of the Form back to OK

Form.Mode = BoFormMode.fm_OK_MODE

Best regards,

Pedro Magueija

View Pedro Magueija's profile on LinkedIn