- Home [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
- Getting started
- Use cases
-
API
- Object types
-
Data types
- AccountType
- DynamicFieldType
- EmailType
- OrganisationStructureItemType
- PhoneType
- ReplacementType
- ServiceStatus
- UserStatus
- WatermarkPages
- WatermarkPosition
- AccountFieldTyped
- AccountFieldVoid
- ApplicationField
- Cell
- ClientEventField
- CookieOptions
- DatetimeFieldData
- DynamicBindingField
- DynamicBindingFields
- EnumField
- ErrorArgs
- ErrorObject
- FileField
- FloatFieldData
- GroupStatusField
- HttpResponse
- ImageField
- Language
- MailMessageAddress
- MailMessageAttachment
- MoneyFieldData
- Navigator
- Page
- ParseSpreadsheetOptions
- ParseSpreadsheetResponse
- RefItem
- ReportField
- ReportRef
- Role
- RoleField
- Row
- ServiceStatusInfo
- StaticApplicationFieldData
- StatusField
- TAccount
- TClientEvent
- TDate
- TDatetime
- TDuration
- TEmail
- TEnum
- TFullName
- TMoney
- TPhone
- TReport
- TStatus
- TTable
- TTime
- TTimezone
- TTimezones
- TableField
- UserField
- UserFieldData
- ValidationResult
- Watermark
- WidgetRefWithValues
- ReplacementTypeEnumBase
- RoleType
- TApplication
- TBoolean
- TCategory
- TFile
- TFloat
- TImage
- TJSON
- TLink
- TOAuth2
- TRole
- TString
- TUser
- Global constants
- Work with apps
- Web requests
- Access permissions
- Document flow
- Live Chats
- “Code” widget
- Signatures
- Business calendars
- Integration with IP telephony
- Integration with email marketing services
Description of the TStatus type field
Stores the settings of statuses set up in an app.
Type parameters
T: string
C: ItemData
Hierarchy
Properties
Readonly all
Array of all available app item statuses.
const statuses = Application.fields.__status.all; // Get first status in anarray const firstStatus = statuses[0]; // Get names of all statuses const statusNames = statuses.map(status => status.name); // Find status by code 'new' const newStatus = statuses.find(status => status.code === 'new');
Please note that this field stores statuses from all the status groups. To get statuses from a specific group check the value of the TStatus.groupId field for the status:
const statuses = Application.fields.__status.all; const groups = Application.fields.__status.groups; // Get names of all the statuses from a group with the code 'sales' const statusNames = statuses.map(status => status.name && status.groupId === groups.sales.id); // Find a status by the code 'new' in the group of default statuses const newStatus = statuses.find(status => status.code === 'new' && status.groupId === groups.__default.id);
If you need only the statuses from the default group, you can also use the data from the variants field
Readonly groups
List of status groups set up for an app.
Every app has a group of default statuses. It is stored in the
__default
field. Status groups are only used in the CRM workspace in the system apps Leads and Deals to represent pipelines. It is impossible to create status groups in other apps.const groups = Application.fields.__status.groups; // Getting the name of the default status group const defaultStatusGroupName = groups.__default.name; // Getting the names of statuses from the status group with the code `sales` const allSalesStatusNames = groups.sales.all.map(status => status.name);
Type declaration
Readonly variants
List of app item statuses from the default statuses group.
const variants = Application.fields.__status.variants; // Get the name of the status with code 'new' const newStatusName = variants.new.name;
Type declaration
Properties