Project new
More actions
Project_new
Create a new project object
Syntax
Project_new(name, templateResourceId, parentResourceId)
Arguments
- name: is a string expression. It is the name of the new project
- templateResourceId: is a number expression. It is the id of project resource template
- parentResourceId: is a number expression. It is the id of the parent resource
Return value
An array, it is a project object which contains the following items
| Index | Data type | Value | 
| USER_RESOURCE_ID | number | Resource id | 
| USER_NAME | string | Username | 
| USER_TEMPLATE_RESOURCE_ID | number | User template's resource id | 
| USER_PASSWORD | string | Password | 
| USER_TIME_REGISTRATION | bool | If time registration is allowed | 
| USER_MAN_HOURS | number | Number of budget hours | 
| USER_CALCULATED_MAN_HOURS | bool | If number of budget hours is calculated on Team tab's settings | 
| USER_PHONE_NUMBER | array | Phone number list | 
| USER_ACCESS_EXPIRATION | aray | Expiration date | 
| USER_PROTECTED_UNTIL | array | Protection deadline | 
| USER_LANGUAGE | string | Language's ISO code | 
| USER_CULTURE | string | Culture's ISO code | 
| USER_EMAIL | string | Email address | 
| USER_FIRST_NAME | string | First name | 
| USER_MIDDLE_NAME | string | Middle name | 
| USER_LAST_NAME | string | Last name | 
| USER_CURRENCY | string | Currency | 
| USER_DISCOUNT | string | Discount | 
| USER_POINT_BALANCE | number | Point balance (read-only) | 
| USER_TIMEZONE | number | Timezone | 
| USER_ADDRESS | string | Address | 
| USER_CITY | string | City | 
| USER_ZIPCODE | string | Zip code | 
| USER_REGION | string | Region | 
| USER_COUNTRY | string | Country's ISO code | 
| USER_POSTBOX | string | Postbox | 
| USER_WEBSITE | string | Website | 
| USER_DELETED | bool | If the user is deleted | 
| USER_DISABLED | bool | If the user is disabled | 
Example
[PROJECT_PLANNED_START_DATE] = getDateTime();
Project_save(project);
Availability
Version 5.6
