Skip to Content
0

Creating project from template using absl

Apr 12 at 10:01 AM

45

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Haitham Emam Apr 12 at 10:50 AM
0

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

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member
Apr 13 at 08:49 AM
0

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

Show 3 Share
10 |10000 characters needed characters left characters exceeded

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.

0
Former Member

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?

0

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

0