Saving data to open uidocument from agent running on server

Hello,I’m using a lotus script agent running on server to get data from DB2 trough LEI. This agent runs in save & complete button of an open uidocument.

When I save data to document from the running agent, it makes save conflict.

Is there a way to write data from the agent running on server to the opened uidocument??

many thanks,

Hagar