- 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
Reference object to an item of an arbitrary app
Reference objects are generally used in App type fields in order to avoid loading all the associated data at once. You can use the [[RefItem. fetch]] method to retrieve the full app item object that is referenced. If the app item is not found, the method returns an error that needs to be processed. Example:
let appItem: any; try { appItem = await Context.data.any_app.fetch(); } catch (err) { // Here the error needs to be processed // An error can be thrown, for example, when the item that the `RefItem` object references is not found }
You can create a reference object using the following constructor:
const refItem = new RefItem(namespace, code, id);
Where: —
namespace
is the workspace’s code. —code
is the code of the app. —id
is the unique ID of the app item. If the app that contains the item that theRefItem
object references is known, you can clearly specify the type of the target item in the constructor:// A `RefItem` object that references a User item const refUserItem = new RefItem<UserItem>('system', 'users', userId);
Type parameters
I: Item<ItemData>
Hierarchy
Properties
Readonly code
App code of the URL’s target (the app’s code).
Readonly id
ID of the URL’s target.
Readonly namespace
Namespace of the URL target (the code of the workspace that the app belongs to).
Methods
fetch
Request complete data of an arbitrary app item.
const any_app_full = await Context.data.any_app.fetch();
Returns Promise<I>
Properties
Methods