CreateProject - accountsIQ/API-Wiki GitHub Wiki

The CreateProject method creates a new Project in the Project Module instance associated to this entity.

Declaration

C#

public WSResultStatus CreateProject(String token, Project project)

Visual Basic

Public Function CreateProject(ByVal token As String, ByVal project As Project) As WSResultStatus

Parameter List

Parameter Type Description
token String The session token retrieved during authentication.
Project Project The Project to create.

Description

The CreateProject method will create a new active Project on the Project Ledger system.

The operation returns a WSResultStatus object.

When the operation is successful, the Status property is OperationStatus.Created.

When the operation is unsucessful, the Status property is OperationStatus.Failure or NotCreated, and the ErrorCode property holds the precise error that happened.

Example

C#

Integration ws = new Integration();
String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
	var newMilestoneProject = new Project
	{
		Name = "Test Milestone Project 1",
		ProjectCode = "TST-MILESTONE-001",
		BillingType = ProjectBillingType.Milestone,
		PricingType = ProjectPricingType.ActivityRate,
		Status = ProjectStatus.Confirmed,
		AIQBICodeID = "DEPARTMENT1",
		AIQCustomerCode = "CUSTOMER1",
		CalendarRBGColour = RBGCalendarColour.RGB_000000,
		CategoryNote = "Category is the default.",
		Description = "Description as a quick overview note.",
		StatusNote = "Note regarding the status of this project.",
		ProjectManagerEmployeeNumber = "MANAGER-001"
	};
var result = ws.CreateProject(auth, newMilestoneProject);
Assert.Equal(OperationStatus.Created, result.Status);
}

Visual Basic

Dim ws As New Integration

Dim auth As String = ws.Login(entityID, partnerKey, userKey)
If (Not Me.auth Is Nothing) Then
	var newMilestoneProject = new Project
	{
		Name = "Test Milestone Project 1",
		ProjectCode = "TST-MILESTONE-001",
		BillingType = ProjectBillingType.Milestone,
		PricingType = ProjectPricingType.ActivityRate,
		Status = ProjectStatus.Confirmed,
		AIQBICodeID = "DEPARTMENT1",
		AIQCustomerCode = "CUSTOMER1",
		CalendarRBGColour = RBGCalendarColour.RGB_000000,
		CategoryNote = "Category is the default.",
		Description = "Description as a quick overview note.",
		StatusNote = "Note regarding the status of this project.",
		ProjectManagerEmployeeNumber = "MANAGER-001"
	};
Dim result As OperationResult = ws.CreateProject(auth, newMilestoneProject)
Assert.Equal(OperationStatus.Created, result.Status);
End If

See Also

⚠️ **GitHub.com Fallback** ⚠️