I have been testing the Project and Project Task creation APIs and found what I believe to be an odd bug. Has anyone else experienced this?
I am creating projects via the msdyn_CreateProjectV1 Action. That is working fine.
I am then trying to add Project Tasks to the above projects (using
msdyn_CreateOperationSetV1
msdyn_PssCreateV1
msdyn_ExecuteOperationSetV1)
and having mixed results with sometimes it working and other times the operationset is Pending. I have been able to recreate this as follows:
- Scenario 1:
- Create the Project using API (msdyn_CreateProjectV1)
- WITHOUT going to the model app Project and opening Task Tab,
- create Project Tasks using API (no errors so different from Scenario 2)
- RESULT: OperationSet is Pending and tasks are not created
- Scenario 2:
- Create the Project using the New button in the Model App.
- WITHOUT going to the model app Project and opening Task Tab,
- create the Project Tasks using the API
- RESULT: ERROR on GetDefaultBucket query (per sample code docs.microsoft.com/.../schedule-api-preview)
- - Exception Message: Please open project with id 2589ac45-0df6-eb11-94ef-0022481e1656 in the Dynamics UI and navigate to the Tasks tab
- Go to Project in model app and open Task tab and wait for it to open
- Close Project form in model app.
- Re-run the create of Project Tasks using the API
- RESULT: OperationSet is Complete and tasks are created as expected
- Scenario 3:
- Create the Project using API (msdyn_CreateProjectV1)
- Go to Project in Model app and click on the Task tab. Close form after Task tab loads.
- create Project Tasks using API
- RESULT: OperationSet is Complete and tasks are created as expected
Can anyone explain this behavior and why it is “Pending” and what needs to be done to complete it? If creating tasks for a Project, is there a pre-requisite that the Task tab must be opened in Model app form manually first?
