on 04-12-2018 11:01 AM
Hello,
I have a requirement to create a project from template in ABSL.
i created the template successfully with ID "1" and i can create projects from tenant using this template.
the issue appears when i try to create it using ABSL it doesnt work i tried 2 things
first code : ( result in error template 1 doesnt exist )
var ProjID : Project.ProjectID;
var templateID: ProjectTemplate.TemplateID;
var projTypeCode: Project.TypeCode;
ProjID.content = "TESTTEMPLATEPROJ";
templateID.content = "1";
projTypeCode.content = "Z3";
Project.CreateProjectFromTemplate(true,true,true,ProjID,templateID,projTypeCode);
second code : ( result in no errors but no project is created )
var ProjID : Project.ProjectID;
var templateID: ProjectTemplate.TemplateID;
var projTypeCode: Project.TypeCode;
ProjID.content = "TESTTEMPLATEPROJ";
templateID.content = "000000000000000000000001";
projTypeCode.content = "Z3";
Project.CreateProjectFromTemplate(true,true,true,ProjID,templateID,projTypeCode);
Hello Haitham,
These obligatory data cannot be sent as action prameters. I do not work with ABSL and cannot tell you exactly how you should code this but you should trigger Modify (Update) for the created project (may be it is necessary to retrieve it at first). The first required field is Project~ROOT-
RESPBL_COST_CTR_ID ( I think it should be Project.ResponsibleCostCentreID) . In order to fill the second field you should use the association Project~ROOT-->PROJECT_SUMMARY_TASK (ProjectSummaryTask) and fill the field RESPBL_EMP_ID-CONTENT (
ResponsibleEmployeeID).
Kind regards, Elena
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you for your reply i create new projects with no source like this and it is working fine.
but now the requirements to create project from a template, there is an action for this but it is not working, there is no project to modify or update i am supposed to create it from a template ID only.
I dont know if there is something wrong with the action or i am missing something, but there are no parameters at all for the missing fields so i think the action itself is missing something.
Now it show 2 errors, Cost center missing and responsible employee missing.
These are not parameters in the action how should i pass them ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.