gktcs12
6 years agoIdeator I
Uploading Files
Hi
I was trying to create a file and add to document item type using an AML query but getting File Item cannot be added
<AML> <Item type="Document" action="add"> <item_number>TEST</item_nu...
I know this is an old thread but for anyone in the future looking for how to add File Items via AML, here is how I was able to get it to work in Aras v12SP18:
<Item type='File' action='add' id='New32GUID'>
<actual_filename>C:\Path\to\MyFile\filename.pdf</actual_filename>
<checkedout_path>C:\Path\to\MyFile</checkedout_path>
<filename>filename.pdf</filename>
<Relationships>
<Item type='Located' action='add'>
<related_id>32GUIDofVaultItemType</related_id>
</Item>
</Relationships>
</Item>
The key for me to get past the "File Item cannot be added" error was to ensure the "id" attribute in the beginning had a new unique 32 character GUID.