Bug? getitemvalue vs getfirstitem

Pls advise if it a bug or am i doing it correct.

The following code will sometime hang


session.convertMime = true

if doc.hasItem(“Body”) then

 set itembody = doc.getfirstitem("Body")  --- may hang

                                                                 here 

The following code is ok


session.convertMime = true

vartype= doc.getitemvalue(“body”)

if doc.hasItem(“Body”) then

 set itembody = doc.getfirstitem("Body")

Subject: bug? getitemvalue vs getfirstitem

I think “body” is the rich text item. So in your first code declare itembody as notes richtextitem and try it.

And in your second code you are assigning “body” to a variable so variable can handle rtfield value.

cheers.

Gopichand

Subject: RE: bug? getitemvalue vs getfirstitem

For my first code, it already declare as notes richtextitem.

Think it a bug in the ‘getfirstitem’ API

Cheers