Reputation: 21
I've got a form that has a log number field. The value of the log number is generated by a piece of LotusScript code. I don't really want to rewrite it in javaScript if I can help it as it works fine. So I did some digging and found a technique for firing LotusScript. The idea is that in your SSJS code you create a document then pass the id of that document to an agent. You fire the agent. The agent then runs the code, updates a field and then back in the SSJS code, you read the contents of the document updated by the agent. The problem I'm having is that when I read back the updated doc, the fields read in the SSJS code are empty tho the document was created the fields updated as I needed them to. I'm thinking it must be a timing thing. I put the code in the OnClientLoad event of the xpage. I can see the doc created, the LogNumber field filed in correctly but it's not visible to the SSJS code and I'm not sure why.
thanks clem
Upvotes: 0
Views: 292
Reputation: 15729
If you update a backend document outside of the SSJS, I think you'll need to recycle the Document, then get it again afresh.
Personally, I'd recommend taking the time to convert it to SSJS. If you look at the recent webinar I did for TLCC with Mike McGarel, I did that live and there's a slide of some things to check for http://tlcc.com/admin/tlccsite.nsf/pages/recorded-xpages-webinars?opendocument. It may take some time, but it will increase your confidence with SSJS and makes it easier for moving, at a later stage, to Java (which is what I do later in the webinar).
Upvotes: 3