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
Solved! Go to Solution.
Solved by JasonDai. Go to Solution.
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.
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);