Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xrm-ex

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xrm-ex - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

2

package.json
{
"name": "xrm-ex",
"version": "1.1.1",
"version": "1.2.0",
"description": "Xrm-Ex is a JavaScript framework that simplifies the usage of Dynamics 365 Client API. It provides intuitive wrappers for formContext and Xrm Object, helping developers reduce the amount of code, increase maintainability, and decrease errors. Ideal for developers looking to leverage the power of Dynamics 365 Client API within the TypeScript ecosystem.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -106,3 +106,90 @@ /// <reference types="xrm" />

class Process {
static get data(): Xrm.ProcessFlow.ProcessManager;
static get ui(): Xrm.Controls.ProcessControl;
/**
* Use this to add a function as an event handler for the OnPreProcessStatusChange event so that it will be called before the
* business process flow status changes.
* @param handler The function will be added to the bottom of the event
* handler pipeline. The execution context is automatically
* set to be the first parameter passed to the event handler.
* Use a reference to a named function rather than an
* anonymous function if you may later want to remove the
* event handler.
*/
static addOnPreProcessStatusChange(handler: Xrm.Events.ProcessStatusChangeHandler): void;
/**
* Use this to add a function as an event handler for the OnPreStageChange event so that it will be called before the
* business process flow stage changes.
* @param handler The function will be added to the bottom of the event
* handler pipeline. The execution context is automatically
* set to be the first parameter passed to the event handler.
* Use a reference to a named function rather than an
* anonymous function if you may later want to remove the
* event handler.
*/
static addOnPreStageChange(handler: Xrm.Events.StageChangeEventHandler): void;
/**
* Use this to add a function as an event handler for the OnPreProcessStatusChange event so that it will be called when the
* business process flow status changes.
* @param handler The function will be added to the bottom of the event
* handler pipeline. The execution context is automatically
* set to be the first parameter passed to the event handler.
* Use a reference to a named function rather than an
* anonymous function if you may later want to remove the
* event handler.
*/
static addOnProcessStatusChange(handler: Xrm.Events.ProcessStatusChangeHandler): void;
/**
* Use this to add a function as an event handler for the OnStageChange event so that it will be called when the
* business process flow stage changes.
* @param handler The function will be added to the bottom of the event
* handler pipeline. The execution context is automatically
* set to be the first parameter passed to the event handler.
* Use a reference to a named function rather than an
* anonymous function if you may later want to remove the
* event handler.
*/
static addOnStageChange(handler: Xrm.Events.StageChangeEventHandler): void;
/**
* Use this to add a function as an event handler for the OnStageSelected event so that it will be called
* when a business process flow stage is selected.
* @param handler The function will be added to the bottom of the event
* handler pipeline. The execution context is automatically
* set to be the first parameter passed to the event handler.
* Use a reference to a named function rather than an
* anonymous function if you may later want to remove the
* event handler.
*/
static addOnStageSelected(handler: Xrm.Events.ContextSensitiveHandler): void;
/**
* Use this to remove a function as an event handler for the OnPreProcessStatusChange event.
* @param handler If an anonymous function is set using the addOnPreProcessStatusChange method it
* cannot be removed using this method.
*/
static removeOnPreProcessStatusChange(handler: Xrm.Events.ProcessStatusChangeHandler): void;
/**
* Use this to remove a function as an event handler for the OnPreStageChange event.
* @param handler If an anonymous function is set using the addOnPreStageChange method it
* cannot be removed using this method.
*/
static removeOnPreStageChange(handler: Xrm.Events.StageChangeEventHandler): void;
/**
* Use this to remove a function as an event handler for the OnProcessStatusChange event.
* @param handler If an anonymous function is set using the addOnProcessStatusChange method it
* cannot be removed using this method.
*/
static removeOnProcessStatusChange(handler: Xrm.Events.ProcessStatusChangeHandler): void;
/**
* Use this to remove a function as an event handler for the OnStageChange event.
* @param handler If an anonymous function is set using the addOnStageChange method it
* cannot be removed using this method.
*/
static removeOnStageChange(handler: Xrm.Events.StageChangeEventHandler): void;
/**
* Use this to remove a function as an event handler for the OnStageChange event.
* @param handler If an anonymous function is set using the addOnStageChange method it
* cannot be removed using this method.
*/
static removeOnStageSelected(handler: Xrm.Events.ContextSensitiveHandler): void;
/**
* Use this method to asynchronously retrieve the enabled business process flows that the user can switch to for an entity.

@@ -152,2 +239,91 @@ * @returns returns callback response as Promise

}
class Fields {
/**
* Adds a handler or an array of handlers to be called when the attribute's value is changed.
* @param fields An array of fields to on which this method should be applied.
* @param handlers The function reference or an array of function references.
*/
static addOnChange(fields: Class.Field[], handler: Xrm.Events.Attribute.ChangeEventHandler): void;
/**
* Fire all "on change" event handlers.
* @param fields An array of fields to on which this method should be applied.
*/
static fireOnChange(fields: Class.Field[]): void;
/**
* Removes the handler from the "on change" event.
* @param fields An array of fields to on which this method should be applied.
* @param handler The handler.
*/
static removeOnChange(fields: Class.Field[], handler: Xrm.Events.Attribute.ChangeEventHandler): void;
/**
* Sets the required level.
* @param fields An array of fields to on which this method should be applied.
* @param requirementLevel The requirement level, as either "none", "required", or "recommended"
*/
static setRequiredLevel(fields: Class.Field[], requirementLevel: Xrm.Attributes.RequirementLevel): void;
/**
* Sets the submit mode.
* @param fields An array of fields to on which this method should be applied.
* @param submitMode The submit mode, as either "always", "never", or "dirty".
* @default submitMode "dirty"
* @see {@link XrmEnum.AttributeRequirementLevel}
*/
static setSubmitMode(fields: Class.Field[], submitMode: Xrm.SubmitMode): void;
/**
* Sets the value.
* @param fields An array of fields to on which this method should be applied.
* @param value The value.
* @remarks Attributes on Quick Create Forms will not save values set with this method.
*/
static setValue(fields: Class.Field[], value: any): void;
/**
* Sets a value for a column to determine whether it is valid or invalid with a message
* @param fields An array of fields to on which this method should be applied.
* @param isValid Specify false to set the column value to invalid and true to set the value to valid.
* @param message The message to display.
* @see {@link https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/attributes/setisvalid External Link: setIsValid (Client API reference)}
*/
static setIsValid(fields: Class.Field[], isValid: boolean, message?: string): void;
/**
* Sets the required level.
* @param fields An array of fields to on which this method should be applied.
* @param required The requirement level, as either false for "none" or true for "required"
*/
static setRequired(fields: Class.Field[], required: boolean): void;
/**
* Sets the state of the control to either enabled, or disabled.
* @param fields An array of fields to on which this method should be applied.
* @param disabled true to disable, false to enable.
*/
static setDisabled(fields: Class.Field[], disabled: boolean): void;
/**
* Sets the visibility state.
* @param fields An array of fields to on which this method should be applied.
* @param visible true to show, false to hide.
*/
static setVisible(fields: Class.Field[], visible: boolean): void;
/**
* Sets a control-local notification message.
* @param fields An array of fields to on which this method should be applied.
* @param message The message.
* @param uniqueId Unique identifier.
* @returns true if it succeeds, false if it fails.
* @remarks When this method is used on Microsoft Dynamics CRM for tablets a red "X" icon
* appears next to the control. Tapping on the icon will display the message.
*/
static setNotification(fields: Class.Field[], message: string, uniqueId: string): void;
/**
* Displays an error or recommendation notification for a control, and lets you specify actions to execute based on the notification.
* @param fields An array of fields to on which this method should be applied.
*/
static addNotification(fields: Class.Field[], message: string, notificationLevel: "ERROR" | "RECOMMENDATION", uniqueId: string, actions?: Xrm.Controls.ControlNotificationAction[]): void;
/**
* Clears the notification identified by uniqueId.
* @param fields An array of fields to on which this method should be applied.
* @param uniqueId (Optional) Unique identifier.
* @returns true if it succeeds, false if it fails.
* @remarks If the uniqueId parameter is not used, the current notification shown will be removed.
*/
static removeNotification(fields: Class.Field[], uniqueId: string): void;
}
/**

@@ -199,3 +375,3 @@ * Represents a form in Dynamics 365.

*/
static addOnSaveEventHandler(handlers: Xrm.Events.ContextSensitiveHandler | Xrm.Events.ContextSensitiveHandler[]): void;
static addOnSave(handlers: Xrm.Events.ContextSensitiveHandler | Xrm.Events.ContextSensitiveHandler[]): void;
/**

@@ -207,3 +383,3 @@ * Adds a function to be called after the OnSave is complete.

*/
static addOnPostSaveEventHandler(handlers: Xrm.Events.ContextSensitiveHandler | Xrm.Events.ContextSensitiveHandler[]): void;
static addOnPostSave(handlers: Xrm.Events.ContextSensitiveHandler | Xrm.Events.ContextSensitiveHandler[]): void;
/**

@@ -213,3 +389,3 @@ * Adds a function to be called when form data is loaded.

*/
static addOnLoadEventHandler(handlers: Xrm.Events.ContextSensitiveHandler | Xrm.Events.ContextSensitiveHandler[]): void;
static addOnLoad(handlers: Xrm.Events.ContextSensitiveHandler | Xrm.Events.ContextSensitiveHandler[]): void;
/**

@@ -219,3 +395,3 @@ * Adds a handler to be called when the attribute's value is changed.

*/
static addOnChangeEventHandler(fields: Class.Field[], handlers: Xrm.Events.ContextSensitiveHandler | Xrm.Events.ContextSensitiveHandler[], execute?: boolean): void;
static addOnChange(fields: Class.Field[], handlers: Xrm.Events.ContextSensitiveHandler | Xrm.Events.ContextSensitiveHandler[], execute?: boolean): void;
}

@@ -381,2 +557,15 @@ namespace Class {

/**
* Sets a lookup with a lookup from the retrieved record.
* @param selectName
* @param retrievedRecord
* @example
* var contact = await fields.Contact.retrieve('?$select=_parentcustomerid_value');
* fields.Account.setLookupFromRetrieve('_parentcustomerid_value', contact);
* //Alternate
* fields.Account.setLookupFromRetrieve('parentcustomerid', contact);
*/
setLookupFromRetrieve(selectName: string, retrievedRecord: {
[x: string]: any;
}): void;
/**
* Retrieves an entity record.

@@ -383,0 +572,0 @@ * @param options (Optional) OData system query options, $select and $expand, to retrieve your data.

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc