Problem 1.There are 2 fields on the form i.e. ID, Name. There is a Submit button which has javascript code, which save data to the notesdatabase. There is a Agent at the event WebQuerySave in the same form. Agent fetch the last document from the view. When I click on submit button to save data, it saves the data in the notesdatabase and when the agent runs it locates the previously saved document button not this one. This is because view is not refreshing up. I have used call view.refresh and I have also set the refresh index property in the view to automatic. But it does not give me correct result.
Problem 2.
There are 2 fields on the form i.e. ID, Name. There is a Submit button which has javascript code, which save data to the notesdatabase. There is a Edit button which enable the document to be in edit mode.
Let suppose, below is my document in the VIEW
ID Name
1 ABC
If I open this above document in edit mode and change the ABC to DEF then the result is
ID Name
1 ABC
1 DEF