Showing results for 
Search instead for 
Did you mean: 

Attach B1-document to B1 Message?

Former Member
0 Kudos


is it possible to attach a link to a B1-document (sales-order) to a B1 message?

Best Regards

Thomas Kneidl

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos


Yes it is possible, each (Anton and Vasu) gives examples are good, but you will see it inside sap b1 only.

SDK provied 2 ways:

Messages object (Old method and working) -> You can populate only one type of document in one message

Message object (by message service) -> You can populate different types of objects (documents) in the same message.



Former Member
0 Kudos


Check the following code, it could help u.

oMessage.Text = MsgText

        'Add Recipient
        oRecipientCollection = oMessage.RecipientCollection

        'Add new a recipient

        'send internal message
        oRecipientCollection.Item(0).SendInternal = SAPbobsCOM.BoYesNoEnum.tYES

        'add existing user code
        oRecipientCollection.Item(0).UserCode = RecipendUserCode

        'get columns data
        pMessageDataColumns = oMessage.MessageDataColumns

        'get column
        'set column name
        pMessageDataColumn1 = pMessageDataColumns.Add()
        pMessageDataColumn1.ColumnName = "Delivery  Number"
        'get lines
        oLines = pMessageDataColumn1.MessageDataLines()

        'add new line
        oLine = oLines.Add()

        'set the line value
        'oLine.Value = "Indent Number"
        oLine.Value = IndentNo

        pMessageDataColumn2 = pMessageDataColumns.Add()
        pMessageDataColumn2.ColumnName = "Request Date"
        oLines = pMessageDataColumn2.MessageDataLines()
        oLine = oLines.Add()
        oLine.Value = RequestDate

        pMessageDataColumn3 = pMessageDataColumns.Add()
        pMessageDataColumn3.ColumnName = "Department"
        oLines = pMessageDataColumn3.MessageDataLines()
        oLine = oLines.Add()
        oLine.Value = Department

        pMessageDataColumn4 = pMessageDataColumns.Add()
        pMessageDataColumn4.ColumnName = "Location"
        oLines = pMessageDataColumn4.MessageDataLines()
        oLine = oLines.Add()
        oLine.Value = Location

        pMessageDataColumn5 = pMessageDataColumns.Add()
        pMessageDataColumn5.ColumnName = "Default Project"
        oLines = pMessageDataColumn5.MessageDataLines()
        oLine = oLines.Add()
        oLine.Value = DefaultProject

        'send the message

Hope it helps,

Vasu Natari.

Former Member
0 Kudos

Yes. There's the Message object, to which you can attach links to SBO documents.

Message->DataColumn (specify the referenced document type here)->DataLine (specify the docEntry of the referenced document here)