« Rosetta Stone for the Global Financial Community | Main| I do feel special - but ... »

ND8 fix required

I was working with a customer and was made aware of a change in the way ND8 works that was breaking her pre-ND8 apps. It turns out that she somehow got forms without the compiled Lotuscript. Prior to ND8, the code was compiled when the form loaded, so no problems. Apparently. for performance reasons, ND8 doesn't do this, so the code behind the events is not found, and the form doesn't load. The fact of the missing object code is not reported by any of our design tools, but it is detectable via Lotuscript. I wrote the following bit of code to print out the forms with this problem.

       Dim s As New NotesSession
       Dim db As NotesDatabase
       Dim doc As NotesDocument
       Dim nn As NotesNoteCollection
       Dim nID As String
       Dim x As Variant
       
      Set db = s.CurrentDatabase
       Set nn = db.CreateNoteCollection( False )
       nn.SelectForms = True
       nn.SelectSubforms = True
       nn.SelectionFormula = "@isAvailable('$$Script')"
       Call nn.BuildCollection
       
       If nn.Count = 0 Then Exit Sub
       nID= nn.GetFirstNoteId
       Set doc = db.GetDocumentByID( nID )
       Do While Not( doc Is Nothing )
               If Not( doc.HasItem( "$$Script_O") ) Then
                       x = doc.GetItemValue( "$TITLE" )
                       Print x( 0 )
               End If
               nID = nn.GetNextNoteId( nID )
               If nID = "" Then Exit Sub
               Set doc = db.GetDocumentByID( nID )
       Loop

Change the bolded line to point to the database you want to scan. This simply prints out the name of any form in the database that is missing the compiled object code. You may not have any, but this step allows you to be proactive in identifying this situation. I hope this is useful and helps.

Category      

Comments

1 - Hi!

Please forgive my ignorance: it's been a long while since I've done any Notes Dev but what is "compiled object code"?

Just wondering if this should trouble us: we had happy auditors when we showed them the result of the TeamStudio upgrade filters, but did we miss this trick?

Many thanks!

Richard

2 - When you 'save' your form, agent, whatever with Lotuscript on it, it gets 'compiled' into yet another intermediate form that is interpreted at run time. This version gets attached to the design element in a field called $$Script_O, unless it doesn't, which is the problem. The presence or absence of this field is not reported by Analyzer, so it can't be tested for. And, I don't know how you can get a form without saving it in designer, but apparently this customer found a way.

Post A Comment

Feeds

Custom Button Custom Button

Category Cloud

Disclaimer

The views expressed by the authors on this blog do not necessarily reflect the views of Teamstudio, those who link to this blog, or even the author’s mother, father, sister, brother, uncle, aunt, grandparents, cousins, step relations, any other blood relative - and sometimes not even the author himself or herself.

Comments on this website are the sole responsibility of their writers and it is assumed those writers will take full responsibility, liability, and blame for any libel or litigation that results from something written in, or as a direct result of something written in, a comment. The accuracy, completeness, veracity, honesty, exactitude, factuality and politeness of comments are not guaranteed. Oh, how they are SO not guaranteed.
en-us,en;q=0.5OFFCCBot/1.0 (+http://www.commoncrawl.org/bot.html)38.107.179.211getthemostfromnotes.comHTTP/1.180Lotus-Domino/tsblog.nsf/D6Plinks/TBAN-7NAPDC-ND8_Fix_Required