Blackberry and WebQuerySave problem

I’m tearing my hair out here…

I have a very simple application where people submit a form in Notes, which then needs to be approved from a Blackberry. On submission, the form sends an email containing its URL to the approvers. They click the URL to open the form on the Blackberry browser.

Up to this point everything works correctly.

We’ve turned off Javascript on the database properties and are using the Domino-generated Submit button for the approvers. A WebQuerySave agent determines which action the approvers want to take based on the value of a combobox field.

Here’s where things get weird (on the Blackberry; this all works correctly when accessed via a browser on a computer.) The choices in the combobox are Approve, Deny, and Hold. Code in the agent determines which sub to call based on that field:

If doc.selectedAction(0) = “Deny” Then

temp = "denied. Notification has been sent to the requester."

Call denyRequest(db, doc, maildoc, rt, tmpForm)

End If

If doc.selectedAction(0) = “Approve” Then

temp = "approved."

Call approveRequest(doc, db)

End If

If doc.selectedAction(0) = “Hold” Then

Call holdRequest(db, doc, maildoc, rt, tmpForm)

temp = "held. Notification has been sent to the requester."

End If

Print "This request has been successfully " & temp

I’ve put a Print statement immediately before these If statements to determine what’s happening:

Print "doc.selectedAction(0) is " & doc.selectedAction(0)

The print statement displays the correct field choice. However, when I remove the print statement, none of the subs are being called.

No matter what the actual value of the field is, the agent doesn’t seem to be calling the subs. It’s just skipping directly to the final Print statement, where I get “This request has been successfully”. It isn’t evaluating the temp variable either.

Any ideas? As I said, this works perfectly from a PC browser; it’s only on the Blackberry that it’s flaking out.

Subject: Blackberry and WebQuerySave problem

Hi Esther

Try getting the server to print out a few items to make sure the content is coming through, i.e. use msgbox doc.SelectedAction(0)

Alternatively, you may wish to look at the field Request_Content. The BlackBerry may be posting data back to the server, just not in the way you expect it to (as it is not like a traditional html browser - depending on the BB Software version). If there is something in Request_Content then you can parse it out and get the information you are looking for.

My company has a team that specialises in Domino to BlackBerry applications - you may be interested in our Domino.Roam toolkit? http://www.lan2lan.com/blackberry

Subject: RE: Blackberry and WebQuerySave problem

Uh, you can’t use Msgbox statements on the web; that’s what Print is for. I’ve already stated thatPrint "doc.selectedAction(0) is " & doc.selectedAction(0) returns the correct information.