"Document has not yet been saved" Error!

Hi

I am working on Notes Client and am facing a peculiar issue.

From a Button in a form, an agent “Agent1” is called based on the roles available to the user.The agent has validations to make sure that the ResouceName field should not be blank. When a user clicks on the button while leaving the Resource Name field blank, the agent is called and the user is prompted to enter the Resource Name field and exits the agent. Again, when the user enters the value in the field and clicks on the button, the error “Document has not yet been saved” is thrown and the agent is not called at all.

There are some hidden fields in the form which have some default values. I seached in the forum and the only solution is found was to do a FileSave before calling the agent. But on doing so the form’s performance has become slow as the agent is called each time there is a click on the button.

Can anybody throw some light in this issue. Please Help!

Thanks in advance

Subject: “Document has not yet been saved” Error!

if your goal is to have the ResourceName field populated and this is an application for the Notes client, use the input validation event for the field.

@if(FIELDNAME=“”;@Failure(“your prompt text”);@Success)

With 6.0 and higher, you can use @ThisValue in place of FIELDNAME

Subject: RE: “Document has not yet been saved” Error!

Hi,

Thanks for the response. But in this case I cannot use Input Validation as the input validation will fire each time the document is saved, but in my case the name of the user would be prompted to enter the resource name only if the user clicking on the button is the ResourceManager (if @name(username)=@getfield(ResourceManager)

Any Ideas?