Thuy Tran
Thuy Tran

Reputation: 11

Acumatica API post Attachment with Comment

I am creating a new Sales Order with Attachment by API as below:

TestApi.Command[] commands = new TestApi.Command[] { 
                new TestApi.Value {Value = "SO", LinkedCommand = SO301000.OrderSummary.OrderType},
                new TestApi.Value {Value = "<NEW>", LinkedCommand = SO301000.OrderSummary.OrderNbr},
                new TestApi.Value {Value = "ACTIVESTAF", LinkedCommand = SO301000.OrderSummary.Customer},
                new TestApi.Value {Value = "thuytrantest", LinkedCommand = SO301000.OrderSummary.CustomerOrder},
                new TestApi.Value {FieldName = "CAM00895_test11.jpg", Value = Convert.ToBase64String(filedata), LinkedCommand = SO301000.OrderSummary.ServiceCommands.Attachment},
                new TestApi.Value {FieldName = "Lich_thi_12-2014_test2.pdf", Value = Convert.ToBase64String(filedata2), LinkedCommand = SO301000.OrderSummary.ServiceCommands.Attachment},

                SO301000.DocumentDetails.ServiceCommands.NewRow,
                new TestApi.Value {Value = "HQ", LinkedCommand = SO301000.DocumentDetails.Branch},
                new TestApi.Value {Value = "AALEGO500", LinkedCommand = SO301000.DocumentDetails.InventoryID},
                new TestApi.Value {Value = "WHOLESALE", LinkedCommand = SO301000.DocumentDetails.Warehouse, Commit = true},

                SO301000.DocumentDetails.ServiceCommands.NewRow,
                new TestApi.Value {Value = "VA", LinkedCommand = SO301000.DocumentDetails.Branch},
                new TestApi.Value {Value = "AAPOWERAID", LinkedCommand = SO301000.DocumentDetails.InventoryID},
                new TestApi.Value {Value = "RETAIL", LinkedCommand = SO301000.DocumentDetails.Warehouse, Commit = true},

                SO301000.Actions.Save,
                SO301000.OrderSummary.OrderNbr
            };

It run ok, but I want to add the comment like the image below

Acumatica Attachment Comment Image

How can I add the comment of attachment? Anyone can help me?

Many thanks.

Upvotes: 0

Views: 110

Answers (1)

RuslanDev
RuslanDev

Reputation: 6778

Unfortunately, there is no way to achieve this though Web Services.

Upvotes: 1

Related Questions