UNPKG

@aappddeevv/dynamics-client-ui

Version:

## What is it? A library to help you create great dynamics applications.

18 lines (17 loc) 845 B
/// <reference types="xrm" /> /** Kept as a separate module to make bundling easier. */ import { XRM } from "./xrm"; /** * Get Xrm from a Promise. Uses polling to wait for * Xrm to become available. Default polling lasts 60 seconds * every 1/2 second. This only checks for Xrm on the parent window * it does *not* walk the window hierarchy. */ export declare function getXrmP(maxIter?: number, delta?: number, getXrm?: () => XRM): Promise<XRM>; /** * Get FormContext as a promise either from Xrm.Page or through the * FormContextHolder. */ export declare function getFormContextP(maxIter?: number, delta?: number): Promise<Xrm.FormContext>; /** Wait for some condition to be true. Uses polling (setInterval) to iterate. */ export declare function wait(cond: (iteration: number) => boolean, maxIter: number, delta: number): Promise<void>;