All Projects → PaulNieuwelaar → Processjs

PaulNieuwelaar / Processjs

Licence: other

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Processjs

Alertjs
Dialog Builder allows you to create fully customisable dialogs and popups in Dynamics 365.
Stars: ✭ 80 (+66.67%)
Mutual labels:  dynamics, microsoft, crm
powerapps-specflow-bindings
A SpecFlow bindings library for model-driven Power Apps.
Stars: ✭ 19 (-60.42%)
Mutual labels:  microsoft, dynamics
powerapps-packagedeployer-template
Enhanced deployment capabilities when deploying with the Power Apps Package Deployer.
Stars: ✭ 18 (-62.5%)
Mutual labels:  microsoft, dynamics
my curd
超轻量 快速开发脚手架、流程平台。
Stars: ✭ 38 (-20.83%)
Mutual labels:  workflow, process
Dyn365 Ce Vsts Tasks
VSTS Extension for Dynamics 365 Customer Engagement
Stars: ✭ 94 (+95.83%)
Mutual labels:  dynamics, crm
Xrm Ci Framework
xRM CI Framework provides you with the tools automate the build and deployment of your CRM Solution. Using the framework to implement a fully automated DevOps pipeline will allow you to deploy more frequently with added consistency and quality.
Stars: ✭ 172 (+258.33%)
Mutual labels:  dynamics, crm
action-sync-node-meta
GitHub Action that syncs package.json with the repository metadata.
Stars: ✭ 25 (-47.92%)
Mutual labels:  workflow, action
Rebuild
Building your business-systems freely! 高度可定制化的企业管理系统 企业中台
Stars: ✭ 169 (+252.08%)
Mutual labels:  crm, workflow
Dynamics 365 Workflow Tools
Dynamics 365 Workflow Tools is a Community solution that expands Microsoft Dynamics 365 (CRM) Workflow features with lots of new posibilities. This helps you to build very advanced Codeless solutions in CRM.
Stars: ✭ 331 (+589.58%)
Mutual labels:  microsoft, crm
Ssh Agent
GitHub Action to setup `ssh-agent` with a private key
Stars: ✭ 365 (+660.42%)
Mutual labels:  action, workflow
Nupdate
A comfortable update solution for .NET-applications.
Stars: ✭ 394 (+720.83%)
Mutual labels:  microsoft, process
Dyn365 Ce Devops
DevOps for Dynamics 365 Customer Engagement (CE) is becoming a popular topic. The goal of this project is to help Dynamics 365 CE solution builders understand and accelerate their implementation of DevOps practices with Dynamics CE and VSTS.
Stars: ✭ 82 (+70.83%)
Mutual labels:  dynamics, crm
Notifyjs
Stars: ✭ 26 (-45.83%)
Mutual labels:  dynamics, crm
generator-nullfactory-xrm
Yeoman generator for Dynamics 365 Solutions. It generates a project structure that facilitates the quick creation builds and automated release strategies with minimal effort.
Stars: ✭ 15 (-68.75%)
Mutual labels:  dynamics, crm
Suitecrm
SuiteCRM - Open source CRM for the world
Stars: ✭ 2,770 (+5670.83%)
Mutual labels:  crm, workflow
alfred-microsoft-onenote-navigator
Use Alfred to browse through your Microsoft OneNote notebooks, section groups and sections and then jump to them instantly.
Stars: ✭ 52 (+8.33%)
Mutual labels:  microsoft, workflow
Yetiforcecrm
Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!
Stars: ✭ 1,056 (+2100%)
Mutual labels:  crm, workflow
Workflow
审批王,华炎魔方内置BPM工作流引擎,低代码快速开发平台。
Stars: ✭ 111 (+131.25%)
Mutual labels:  crm, workflow
Compressed Size Action
GitHub Action that adds compressed size changes to your PRs.
Stars: ✭ 300 (+525%)
Mutual labels:  action, workflow
Workflower
A BPMN 2.0 workflow engine for PHP
Stars: ✭ 540 (+1025%)
Mutual labels:  process, workflow

Process.js - CRM 2013-Dynamics 365 Call Actions and Workflows from JavaScript

download (v2.0)

Overview

This simple JavaScript library allows you to easily call workflows, dialogs, and actions in CRM from forms, views, web resources, or anywhere that supports JavaScript. This solution works in CRM 2013, CRM 2016, and everything in between, including CRM Online and CRM 2016 Update 1.0. (Also in my opinion easier to use and better than Web Api is currently).

In the past if you've needed to call a workflow or action from JavaScript, you need to build a massive XML SOAP request making sure to pass in the correct attributes and conditions to get the request working.

This is tedious and messy, especially when there are many places you need to do this in a solution. It's also not good if something breaks in the future and you need to go back and fix up all instances of where the code is being used.

For these reasons, I've created this library to simplify calling processes, and to make the code manageable going forward. But most of all, it's so I don't have to keep finding the correct way to build the SOAP requests!

For completeness, I've also included a function for calling dialogs, which simply pops open the specified dialog.

Make sure to add a reference to the process.js code library on your form or ribbon.

Check out the Documentation for more detailed usage information.

Call Action

Calls the specified action and returns the response from the action asynchronously. Useful when needing to run C# code from web resources or command bar buttons when only JavaScript is available.

You can also kind of call the CRM "actions" such as create and update by specifying the action name as "Create" or "Update", and the pass in the correct input parameters, i.e. an Entity object called "Target". While this does appear to work, I'm not supporting such calls, so please stick to custom actions if you want it to work in future :)

Parameters: Action Unique Name, Input Parameters (array), Success Callback (function), Error Callback (function), CRM Base URL (not required on forms/views)

Each Input Parameter object should contain key, value, and type. Types are defined by Process.Type enum. EntityReference values should be an object containing id and entityType.

To assist with creating EntityReference and Entity objects, use the build in Process.EntityReference and Process.Entity types, e.g.: var entity = new Process.Entity("account", "{guid}"); entity.attributes["fieldname"] = "Some value";

The Success Callback function should accept 1 argument which is an object containing the output parameters. E.g. to access the "OutputParam1" value, use: var value = params["OutputParam1"]. If the output param type is Entity or EntityReference, the "value" will be of those types, allowing you to access properties like: value.id. EntityCollections will simply be an array of Entity objects.

Access fields from an entity object using: value.attributes["fieldname"].value (check for null first), or use the extension method: value.get("fieldname") to handle the null check itself. Access formatted values for certain field types using: value.formattedValues["fieldname"].

Check out Process.js Extensions for pre-made sample Actions which can be used with Process.js to get you started.

Usage:

Process.callAction("mag_Retrieve",
    [{
        key: "Target",
        type: Process.Type.EntityReference,
        value: new Process.EntityReference("account", Xrm.Page.data.entity.getId())
    },
    {
        key: "ColumnSet",
        type: Process.Type.String,
        value: "name, statuscode"
    }],
    function (params) {
        // Success
        alert("Name = " + params["Entity"].get("name") + "\n" +
              "Status = " + params["Entity"].formattedValues["statuscode"]);
    },
    function (e, t) {
        // Error
        alert(e);

        // Write the trace log to the dev console
        if (window.console && console.error) {
            console.error(e + "\n" + t);
        }
    });

Call Workflow

Runs the specified workflow for a particular record asynchronously. Optionally, you can add callback functions which will fire when the workflow has been executed successfully or if it fails.

Parameters: Workflow ID/Guid, Record ID/Guid, Success Callback (function), Error Callback (function), CRM Base URL (not required on forms/views)

Usage:

Process.callWorkflow("4AB26754-3F2F-4B1D-9EC7-F8932331567A", 
    Xrm.Page.data.entity.getId(),
    function () {
        alert("Workflow executed successfully");
    },
    function () {
        alert("Error executing workflow");
    });

Call Dialog

Note: This function has been deprecated. It will remain in the solution, however no future enhancements or fixes will be done. Please check out Alert.js for a better way of showing dialogs.

Opens the specified dialog for a particular record in a CRM light-box, or Modal Dialog if run from Outlook. Once the dialog is closed, a custom callback function can be executed, e.g. to refresh the form with new data set by the dialog.

Parameters: Dialog ID/Guid, Entity Name, Record ID/Guid, Callback function, CRM Base URL (not required on forms/views)

Usage:

Process.callDialog("C50B3473-F346-429F-8AC7-17CCB1CA45BC", "contact", 
    Xrm.Page.data.entity.getId(),         
    function () { 
        Xrm.Page.data.refresh(); 
    });

Created by Paul Nieuwelaar - @paulnz1
Sponsored by Magnetism Solutions - Dynamics CRM Specialists

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].