Reading Data Attachment Objects from a Data Attachment List

Ginger_Main
New Contributor II

Hello All,

I am creating a confirmation rule with the following goal:

- Read data attachment text from from a V#Annotation field 

Due to my unfamiliarity with the DataAttachmentList object, I have been unsuccessful in utilizing this list within my rule. I wanted to reach out to the community and see if anyone could help correct my mistakes. My code for testing is as follows:

Ginger_Main_0-1700665989361.png

 

 

1 REPLY 1

FrankDK
Contributor

A guess would be that "List(Of Items)" does not match "DataAttachment". Try below

For Each item As DataAttachment In CommentaryVar.Items
  Brapi.ErrorLog.LogMessage(si, item.Text)
Next

'' or just

For Each item in api.Data.GetDataAttachments(.....
  Brapi.ErrorLog.LogMessage(si, item.Text)
Next

For future questions, including something like compiler output/error messages makes it easier to troubleshoot 🙂