Error while creating a Project from ARAS.IOM api

Hi, I am trying to create a Project using Aras.IOM API. I have given all the mandatory fields values, like target start date, target finish date, project name etc.... but still error is thrown: <SOAP-ENV:Envelope xmlns:SOAP-ENV="">schemas.xmlsoap.org/.../" xmlns:i18n="">www.aras.com/I18N"><SOAP-ENV:Body><SOAP-ENV:Fault><SOAP-ENV:Envelope xmlns:SOAP-ENV="">schemas.xmlsoap.org/.../" xmlns:i18n="">www.aras.com/I18N"><SOAP-ENV:Body><SOAP-ENV:Fault> <faultcode>1</faultcode> <faultactor></faultactor> <faultstring>Method server_update_schedule failed: FAILURE: WBS_ID is null</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> Am I missing some file values?? Looks like WBS_ID is null but what should be its default value?  
  • Sorry my mistake, I was not passing mandatory field values of Target start date and target finish date, but now I have other issue encountered: "The specified value for property Target Due '2017-10-10 18:30:00.000' of Project does not match the required format." Below code I am using to create a project: newITem = MyInnovator.newItem("project", "add"); newITem.setProperty("name", "testpart001"); newITem.setProperty("date_start_target", "2017-10-10 18:30:00.000"); newITem.setProperty("date_due_target", "2017-10-10 18:30:00.000"); newITem.setProperty("project_update_mode", "1"); newITem.setProperty("scheduling_mode", "1"); newITem.setProperty("scheduling_type", "Forward"); result = newITem.apply();   Please help. Thanks!  
  • Hello, Could you please clarify your reasoning for creating a Project programmatically? In addition to the date formatting, I had to modify your sample to include a root element to the project. This would indicate that there is some additional logic that is intended to be run upon adding a project but that is bypassed when a project is created from a Method. I would recommend testing the Projects that are created from this Method to ensure that there is no loss of functionality. That being said, you can find the updated sample to create a project below.
    Innovator MyInnovator = this.getInnovator();
    
    Item newITem = MyInnovator.newItem("project", "add");
    newITem.setProperty("project_number", MyInnovator.getNextSequence("Project Number"));
    newITem.setProperty("name", "testproject001");
    newITem.setProperty("date_start_target", "2017-10-10T18:30:00");
    newITem.setProperty("date_due_target", "2017-10-10T18:30:00");
    newITem.setProperty("project_update_mode", "1");
    newITem.setProperty("scheduling_mode", "1");
    newITem.setProperty("scheduling_type", "Forward");
    
    // Create the root element of the project plan
    Item newWBSElement = MyInnovator.newItem("WBS Element", "add");
    newWBSElement.setProperty("name", newITem.getProperty("project_number"));
    newWBSElement.setProperty("is_top", "1");
    newITem.setPropertyItem("wbs_id", newWBSElement);
    
    Item result = newITem.apply();
    
    return result;
  • Hi Chris, Thank you for your help.  You simply saved my day :)