PublicAPI.CRM.Sale.SetStatus ELMA API Documentation
Change Sale Status
 
 
Syntax

public void SetStatus(
	Sale sale,
	SaleStatus saleStatus,
	string comment
)

Parameters

sale
Type: Sale
Sale, whose status needs to be changed. Object. Access path: PublicAPI.CRM.Sale
saleStatus
Type: SaleStatus
New sale status. Enumeration. Access path: PublicAPI.Enums.CRM.Enums.SaleStatus
comment
Type: System String
Comment when changing the status (optional parameter)
Examples

//load a sale by ID 
var sale = PublicAPI.CRM.Sale.Load(3);
//get the "Active" sale status 
var saleStatus = PublicAPI.Enums.CRM.Enums.SaleStatus.Active;
//comment when changing the sale status 
var comment = "Comment";

//change the sale status
PublicAPI.CRM.Sale.SetStatus(sale, saleStatus, comment);
See Also