erdomke / InnovatorAdmin

A tool for managing Aras Innovator installations focusing on improving the import/export experience.
http://erdomke.github.io/InnovatorAdmin/
MIT License
58 stars 42 forks source link

Error while typing a new aml query #180

Open MangeshK3007 opened 7 years ago

MangeshK3007 commented 7 years ago

I am trying to add document as item and its related file(actual attachment) but when I click on editor I got nullpointer exception.

Please provide AML query to upload a file.

rneuber1 commented 7 years ago

What is your AML? Did you see https://github.com/erdomke/InnovatorAdmin/wiki/Uploading-and-Downloading-Files ?

\Ralf

MangeshK3007 commented 7 years ago

This is AML

G:\abc.docx
MangeshK3007 commented 7 years ago

I tried which is on this link https://github.com/erdomke/InnovatorAdmin/wiki/Uploading-and-Downloading-Files ? still its not working.

erdomke commented 6 years ago

Sorry for the delay. After glancing at the code and some experimentation, it appears that you need to specify a new ID. For example, the AML shown below should work. I updated the wiki to reflect this.

<Item type='File' action='add' id='NEW_GUID_HERE'>
  <actual_filename>C:\Path\To\File.Extension</actual_filename>
</Item>

You can also specify a full structure such as

<Item type='Document File' action='add'>
  <source_id type='Document'>8481D6D585E7419DA5743B1AAC9FFBB9</source_id>
  <related_id>
    <Item type="File" action="add" id='78759E44FE8E48F1AF1D296AEF8E80B9'>
      <actual_filename>C:\Path\To\File.Extension</actual_filename>
    </Item>
  </related_id>
</Item>

Yet another option when creating a structure is to use the Intellisense to select the file using a browse dialog

uploadintellisense

If these options are still not working for you, let me know.

MangeshK3007 commented 6 years ago

Thanks, It Works, But every Time do I need to give a ID? can ID be automatically generate, instead of providing by us?