UpdateDepartment - accountsIQ/API-Wiki GitHub Wiki

The UpdateDepartment modifies the description and active status of a Department (or BI Code).

Use this when you wish to retire a code or simply update the description. Note that the code itself is immutable.

Declaration

C#

public WSResultStatus UpdateDepartment(String token, String departmentID, String newDescription, Boolean active)

Parameter List

Parameter Type Description
token String The session token retrieved during authentication.
departmentID String The unique and immutable code for this BI Code / Department. This must already exist in the system.
newDescription String The new description of the BI Code / Department. This appears on listings and reports.
active Boolean The active status flag: `true` for active, `false` for inactive.

Example

The following example creates an invoice, a receipt and perform an allocation:

C#

Integration ws = new Integration();

String auth = ws.Login(entityID, partnerKey, userKey);
if( auth != null )
{
	var result = ws.UpdateDepartment(auth, "DEPT1", "New description", true);
        if(!result.Result) throw new Exception("Could not update the department");
}

See Also

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