on 10-27-2015 10:31 AM
Hello Experts,
is there a possibility to save a Attachment to Document, for example to a Delivery?
I have found the object 221 / Attachement 2 but my attempt failed:
<AdmInfo>
<!--multiple such elements are allowed-->
<Object>221</Object>
<Version>2</Version>
</AdmInfo>
<Attachments2_Lines>
<!--multiple such elements are allowed-->
<row>
<!--multiple such elements are allowed-->
<SourcePath>C:\temp\Out\test.pdf</SourcePath>
<FileName>test.pdf</FileName>
<FileExtension>pdf</FileExtension>
<!--<Override>tNo</Override>-->
</row>
</Attachments2_Lines>
the Errormessage is not helpful:
<Payload status="success" id="atom3" Role="C" DImsg="
Exception : DI error: Invoke of: GetBusinessObjectFromXML Source: SAPbobsCOM.Company.90.0 Description: ...."
DIresult="failure" keyvalue="" keyname="" payload="atom4" objectid="221" method="Synchronous Insert"
b1login="Technical User" system="0010000113"/>
has anybody solved this problem?
Thanks and best Regards
Hello Ronny,
Use the sbo-service-atom instead of the sbo-api-atom.
Then create an entry in the attachment object (if not exists) including an line with an attachement.
Use the result for updating the documentattachment.
Check the di-api help for more info.
Kind Regards Teun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Teun,
which SBO-Service-Atom do you mean?
i have update my Metadata but i don't find any funktion.
i have successful create a Attachment Entry with the api-Atom:
<BOM xmlns="">
<BO>
<AdmInfo>
<Object>221</Object>
<Version>2</Version>
</AdmInfo>
<Attachments2_Lines>
<row>
<SourcePath>C:\temp\Out</SourcePath>
<FileName>Test_300001_20151029101740</FileName>
<FileExtension>PDF</FileExtension>
<Override>tYES</Override>
</row>
</Attachments2_Lines>
</BO>
</BOM>
you must insert the BOM/BO Element.
Now, i wan't create a new line to existing AbsEntry.
i have testet with Queryparams-Entry, without Bom/BO.
Do you have any Idea?
Thanks and best Regards
Ronny
Hello Ronny,
I refered to the atom SBO-Service but just checked it and attachments are not available in this atom.
You has got the right atom, my mistake.
For adding another attachement i assume you need to add a new line and keep the existing one and update the object?
Did you already tried this?
Regards Teun
Hello Teun,
i have insert a new line to a existing AbsEntry :
<xsl:template name="transform">
<Attachments2_Lines xmlns="">
<!--at First all existing Lines-->
<row>
<SourcePath>C:\temp\Out</SourcePath>
<FileName>Parcellabel_300001_20151109105852</FileName>
<FileExtension>pdf</FileExtension>
</row>
<!--Now the new Attachment-->
<row>
<SourcePath>C:\temp\Out</SourcePath>
<FileName>Parcellabel_300002_20151109105852</FileName>
<FileExtension>pdf</FileExtension>
</row>
</Attachments2_Lines>
</xsl:template>
Thanks for your help
Best Regars
Ronny
User | Count |
---|---|
92 | |
9 | |
9 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.