RE: How To: Passing parameter to Agent via POST method? Joe Pugh 18.Jun.01 06:47 AM a Web browser Domino Designer -- Agents Release 5All Platforms
Hi
I have had the same problem in the past with long url's. I couldn't find any way to get a Notes Agent to accept POST parameters directly so setting a form action to db.nsf/agentname and the method to POST did nothing for me.
I did manage to come up with another way to do this though. What you need to do is create a form in your database with fieldnames that match all of the field names on your html forms, just make them editable text fields or something. You also need to put a computed SaveOptions field on the form and set the value to "0". Next you need to set the WebQuerySave event of this form to be the agent that you wanted to pass your POST parameters to. Now on your original HTML form, set the METHOD to POST and the ACTION to db.nsf/newformname?CreateDocument, where newformname is the name that you gave the form with the fields on. When you submit the html form it will call the webquerysave agent and all of the original field names will be visible directly in your agent just using the field values on the documentcontext property. You will know if the fields are all there as you will get an ItemNotFound error when you try to submit the HTML form and you have missed any fields.