Community
Vault Forum
Welcome to Autodesk’s Vault Forums. Share your knowledge, ask questions, and explore popular Vault topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Vault API - update change order error

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Anonymous
868 Views, 5 Replies

Vault API - update change order error

I am attempting to add a file to be tracked by a change order via the API. I am using the code below. I am not attempting to make any other changes to the change order. I get an unspecified system exception as in the attached. Am I filling in one of the UpdateChangeOrder parameters incorrectly? I have just filled in unused options with "null". 

 

 

long my_filemasterid = my_filetoadd.MasterId;

long[] my_fileids = { my_filemasterid };

my_coSvc.EditChangeOrder(my_co.Id);

my_coSvc.UpdateChangeOrder(my_co.Id, null, my_co.Title, my_co.Descr, my_co.Deadline, null, null, null, null, my_fileids, null, null, null, null, null, null, null, -1, null, null);

 

thanks,

Tim

5 REPLIES 5
Message 2 of 6
minkd
in reply to: Anonymous

Try passing the current change order number as the 2nd parameter.

 

 



Dave Mink
Fusion Lifecycle
Autodesk, Inc.
Message 3 of 6
Anonymous
in reply to: minkd

I attempted that, but got the same error. Am I required to send a comment or email - or do I need to supply empty arrays vrs sending null values?
Message 4 of 6
JasonDai
in reply to: Anonymous

Supplying empty arrays instead of null values would be a good idea to fix this issue.

Message 5 of 6
Redmond.D
in reply to: JasonDai

Generally in the Vault API, null is equivalent to an empty array.  I would expect this funciton to allow allow null values.  I'll log this as an issue.



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 6 of 6
Anonymous
in reply to: Anonymous

It looks like only addItemMasterIds is expected to have some sort of array, even if it is empty. All other array inputs can be null. So the following works just fine.

 

long[] null_array = new long[0];

my_coSvc.UpdateChangeOrder(my_co.Id, null, my_co.Title, my_co.Descr, my_co.Deadline, null_array, null, null, null, my_fileids, null, null, null, null, null, null, null, -1, null, null);

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report