Project save
Project_save
Save a project object to the database
Syntax
Project_save(projectObject)
Arguments
- projectObject: is an array. It is the project object which contains the following items
Index |
Data type |
Value |
OBJECT_TYPE |
number |
Object type (Default value: 4) |
PROJECT_RESOURCE_ID |
number |
Resource id (Default value: 0) |
PROJECT_NAME |
string |
Project name |
PROJECT_TEMPLATE_RESOURCE_ID |
number |
Project template's resource id |
PROJECT_TIME_REGISTRATION |
bool |
If time registration is allowed (Default value: True) |
PROJECT_COMPLETED |
bool |
Complete a project (Default value: False) |
PROJECT_PARENT_RESOURCE_ID |
number |
Project's path |
PROJECT_CODE |
string |
Project code |
PROJECT_PROPOSE_CODE |
number |
Propose Code [Read Only] |
PROJECT_CLIENT_REF_NO |
string |
Client ref no (Default value: Empty) |
PROJECT_TIME_BUDGET |
number |
Time Budget |
PROJECT_CALCULATED_MAN_HOURS |
bool |
Calculated Man-Hours (Default value: False) |
PROJECT_PLANNED_START_DATE |
array (date time) |
Planned Start Date (Default value: MinDate) |
PROJECT_ACTUAL_START_DATE |
array (date time) |
Actual Start Date (Default value: MinDate) |
PROJECT_PLANNED_END_DATE |
array (date time) |
Planned End Date (Default value: MaxDate) |
PROJECT_ACTUAL_END_DATE |
array (date time) |
Actual End Date (Default value: MaxDate) |
Return value
empty
Example
array project = Project_new("My new project", 15548984, 50755);
print(project);
//Result: {4,0,My new project,15548984,True,False,50755,CC10014CCC,10014,,0,False,{1,1,1,7,0,0,0,1,65},{1,1,1,7,0,0,0,1,65},{9999,12,31,23,59,59,999,52,65},{9999,12,31,23,59,59,999,52,65}}
project[PROJECT_PLANNED_START_DATE] = getDateTime();
Project_save(project);
print(project);
//Result: {4,37279418,My new project,15548984,True,False,50755,CC10014CCC,10014,,0,False,{2011,12,22,17,14,25,187,51,65},{1,1,1,7,0,0,0,1,65},{9999,12,31,23,59,59,999,52,65},{9999,12,31,23,59,59,999,52,65}}
Availability
Version 5.6