mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-07 01:39:07 +00:00
Adding XRM v8.2 features
This commit is contained in:
838
xrm/index.d.ts
vendored
838
xrm/index.d.ts
vendored
File diff suppressed because it is too large
Load Diff
@@ -75,7 +75,8 @@ Xrm.Utility.openQuickCreate("account").then(( object ) => { if (object) alert( `
|
||||
|
||||
/// Make all controls visible.
|
||||
|
||||
Xrm.Page.ui.controls.forEach(( control ) => { control.setVisible( true ); });
|
||||
// Xrm.Page.ui.controls.forEach(( control ) => { control.setVisible( true ); }); // No longer works
|
||||
Xrm.Page.ui.controls.forEach((control: Xrm.Page.StandardControl) => { control.setVisible(true); }); // Must cast to StandardControl
|
||||
|
||||
/// Make all tabs and sections visible.
|
||||
|
||||
@@ -166,4 +167,28 @@ autoCompleteControl.hideAutoComplete();
|
||||
|
||||
|
||||
|
||||
/// Demonstrate v8.2 quick form controls
|
||||
|
||||
const quickForm = Xrm.Page.ui.quickForms.get(0);
|
||||
quickForm.getControlType(); // == "quickform"
|
||||
quickForm.getName();
|
||||
quickForm.getParent();
|
||||
quickForm.getVisible(); // From UiCanSetVisibleElement
|
||||
quickForm.getLabel(); // From UiLabelElement
|
||||
quickForm.setLabel("Label"); // From UiLabelElement
|
||||
quickForm.refresh();
|
||||
|
||||
// Get standard control
|
||||
const ctrl = Xrm.Page.getControl<Xrm.Page.StandardControl>("controlName");
|
||||
ctrl.getControlType()
|
||||
ctrl.getName();
|
||||
ctrl.getParent();
|
||||
ctrl.getLabel();
|
||||
ctrl.setLabel("Label name");
|
||||
ctrl.getVisible();
|
||||
ctrl.setVisible(true);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user