How to add oAttachments2 to oPurchaseQuotations using B1 DI Server API?

1 month ago 19

Hello everyone:

  I request to adhd "n" fig of attachments to my Purchase order, I'm utilizing B1 DI Server API by creating XML files andt past nonstop them to a DIServer Client. 

I spot a tract successful oPurchaseQuotations "AttachmentEntry", should I constitute my attachments successful this field? how?

These are my xml files 

For oPurchaseQuotations:

<?xml version=\"1.0\" encoding=\"utf-16\"?>
<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\">
<env:Header>
<SessionID>idSession</SessionID>
</env:Header>
<env:Body>
<AddObject xmlns=\"http://127.0.0.1/SAP/\">
<BOM>
<BO>
<AdmInfo>
<Object>oPurchaseQuotations</Object>
</AdmInfo>
<Documents>
<row>
<CardCode>aCardcode</CardCode>
<CardName>aCardName</CardName>
<NumAtCard>aNumAtCard</NumAtCard>
<RequriedDate>aDate</RequriedDate>
<DocDueDate>aDocDuedate</DocDueDate>
<SalesPersonCode>-1</SalesPersonCode>
<AttachmentEntry>WHAT SHOULD I WRITE HERE</AttachmentEntry>
</row>
</Documents>
<Document_Lines>
<row>
<ItemCode>anItemCode</ItemCode>
<Quantity>aQuantity</Quantity>
<Price>aPrice</Price>
<FreeText>aText</FreeText>
<ShipDate>aDate</ShipDate>
<RequiredQuantity>aQuantity()</RequiredQuantity>
<RequiredDate>aDate</RequiredDate>
<UnitPrice>aPrice</UnitPrice>
</row>
</Document_Lines>
<Document_SpecialLines>
<row>
<AfterLineNumber>aNumber</AfterLineNumber>
<LineType>aLineType</LineType>
<LineText>aText</LineText>
</row>
</Document_SpecialLines>
</BO>
</BOM>
</AddObject>
</env:Body>
</env:Envelope>

For oAttachments2:

<?xml version="1.0" encoding="UTF-16" ?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<SessionID>idSession</SessionID>
</env:Header>
<env:Body>
<AddObject xmlns=\"http://127.0.0.1/SAP/\">
<BOM>
<BO>
<AdmInfo>
<Object>oAttachments2</Object>
</AdmInfo>
<Attachments2 />
<Attachments2_Lines>
<row>
<SourcePath>fileSourcePath</SourcePath>
<FileName>fileName</FileName>
<FileExtension>fileExtension</FileExtension>
</row>
<row>
<SourcePath>fileSourcePath</SourcePath>
<FileName>anotherFileName</FileName>
<FileExtension>fileExtension</FileExtension>
</row>
</Attachments2_Lines>
</BO>
</BOM>
</dis:AddObject>
</env:Body>
</env:Envelope>

Thanks successful beforehand for your response

Read Entire Article