Creating Zoho project when a deal is won

Creating Zoho project when a deal is won

Hi all, 

I have used the below to create a new project in Zoho Projects when a deal is closed won in Zoho CRM. 

createMap = Map();
createMap.put("name",ProjName + " " + "AML/CFT audit");
createMap.put("description",Description);
createMap.put("start_date",startdate.subWeek(1).toString("MM-dd-yyyy"));
createMap.put("end_date",enddate.addWeek(3).toString("MM-dd-yyyy"));
createMap.put("template_id",TemplateID);
createMap.put("layout_id",LayoutID);
createMap.put("public","yes");
createMap.put("owner_id",UserID);
response = zoho.projects.createProject(PortalName,createMap);
info response;

The project is created in Zoho projects; however, the issue I am having is the end date and the project owner are not being assigned to the project (Everything else works as expected). startdate and enddate and equal to the same deal date field in the function argument. 

Could anyone please advise on what I am doing wrong here? 

On a side note is it possible to link the project to the account that the deal is associated to when the function is executed? 

Thanks for your help.