- 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
-
Global constants
- Application
- ApplicationUserProfile
- ApplicationWithBatcher
- ApplicationWithParams
- BrandingSettings
- CompanyInfo
- Converter
- Directories
- Files
- HttpApiHandler
- HttpApiRequest
- ICache
- IStorage
- MailMessage
- Mailbox
- OrganisationStructure
- OrganisationStructureTree
- Portal
- PortalPageInfo
- PortalSettings
- Portals
- Process
- Processes
- ProductionSchedule
- Reminders
- Replacements
- Serial
- ServerCollection
- Service
- SignupUrlParams
- SystemCollections
- SystemCollectionsWithEvents
- SystemCollectionsWithFilterEvents
- Templater
- Translator
- UserGroups
- Users
- Watermarks
- Report
- Reports
- SR
- 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
Substitution object
Used to create substitutions.
Hierarchy
Methods
create
The method initializes a new substitution.
After specifying substitution details you need to save the substitution by calling the ReplacementItem.save mehtod.
// Let's create a substitution for an employee who is going on holiday const rpl = System. replacements.create(); rpl.data.type = rpl.fields.type.variants.reassign; rpl.data.absent = Context.data.__createdBy; rpl.data.replacement = Context. data.substitution; rpl.data.begin = Context.data.vacation_start; rpl.data.end = Context.data.vacation_end; await rpl.save();
Returns ReplacementItem
search
The method searches for substitutions.
To search for items in the collection, use the Search object:
const replacements = await System.replacements.search() . where(r => r.absent.eq(Context.data.absent_user)) .all();
Read more about using search in the article about the user search object.
Returns ReplacementSearch
Methods