cancel
Showing results for 
Search instead for 
Did you mean: 

Creating project from template using absl

former_member545775
Participant
0 Kudos

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);

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member745475
Discoverer
0 Kudos

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

former_member545775
Participant
0 Kudos

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.

former_member745475
Discoverer
0 Kudos

I tested this action in backend (test tool SESFTS); an instance was created but I had to click on it in order to get it shown - that is why I suppose that a retrieve is necessary. Do you have retrieve in ABSL?

former_member545775
Participant
0 Kudos

yes i have retrieve but it is not created due to error ( missing responsible unit and responsible employee ), so i cannot retrieve it

former_member545775
Participant
0 Kudos

Now it show 2 errors, Cost center missing and responsible employee missing.

These are not parameters in the action how should i pass them ?