project.CreateProjectFromTemplate workaround

W

Winnes

This call gave exceptions, because the templates used had required custom
fields not filled in (in the template).
Let me clarify this, project.CreateProjectFromTemplate did a great job, but
a subsequent update of this newly created project (from template) fails
saying these required custom fields were not filled in, although in the
update all necessary custom fields are provided with correct values.

Clients do not like to wait, so we thought of a workaround:
- Read Template
- Use ProjectDataSet read to call QueueCreateProject

Several issues have been resolved, won't go into detail, one still remains...
Dependency DataSet plain copy gives GeneralInsertsOnly exception.
Of course project uid needs to be the new one since we are trying to mimic
createfromtemplate.
Tried already to replace predecessor/successor uids to newly (from template)
created task_uids.
Also attempted to use a new Guid for custom_field_uid, no success there again.
Another thing tried: create "from template" without dependencies and then
update with dependencies... same result.

Any one of you guys have any other ideas?
Thanks
 
W

Winnes

Thanks for the reply.
Dependency data is copied into a ProjectdataSet from the original (template)
project and then passed on to QueueCreateProject() method.
Probably solution will be (as I did before for other entities in this
matter): create without dependencies, afterwards update the projects with
dependecyrow(s).
Haven't had the opportunity to test it out... yet...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top