Git Product home page Git Product logo

d365-updateanyentity's Introduction

D365 Update any Entity and Children

The solution offers two global actions, one to allow updating an entity without knowing its type a priori. The other allows updating the children of an entity whose type is not known a priori, starting with the name of the relationship.

The idea came from the need to perform updates on entity and/or children (link-entity) following a cloning operation done with the D365 Configurable Entity Cloner solution. In these scenarios, the type of the entity and children is not known a priori. So to avoid writing dedicated components for each scenario, I tried to develop generic components to perform field updates, in a configurable and entity type-independent manner.

Features

  • Update attributes on entity of any type.
  • Update attributes on link-entity (children) of any type.

Getting started

Prerequisites

Dynamics 365 v9.2+

Install

Build the project and deploy the assembly into your environment.

Usage

Update Generic Entity

Updates attributes on entity. image

Integrate the action Update Generic Entity where you want to trigger it (Workflow, Javascript function, etc.).

Parameters-Configuration
  • RecordInfo:

    • "RecordId" as string
      • example D06F15DB-EEA5-4086-996B-47987DDB7628
    • "RecordUrl" (string)
      • example: https://myorg.crm.dynamics.com/main.aspx?etn=account&pagetype=entityrecord&id=%7B91330924-802A-4B0D-A900-34FD9D790829%7D
  • EntityName: schema-name of the entity

    • required only when RecordInfo is a (string)RecordId
    • example: account
  • UpdateInactive

    • false -> the entity is updated only if it is in an active state
    • true -> the entity is updated whatever its state is (active/inactive)
  • AttributesNameValue: a string containing a sequence of Attribute-Name/Attribute-Value

    • format: jdm_field1=>val1<>jdm_field2=>val2<>jdm_field3=>val3...
      • <> is a separator for the different Attribute-Name/Attribute-Value pair
      • the value for the attributes is a normal string: it is parsed by the module to the proper attribute-type
      • to set a null value for an attribute, simply provide and "empty value":
        • example: jdm_field1=><>jdm_field2=><>jdm_field3=>val3

Update Entity Children

Updates attributes on link-entities. image

Integrate the action Update Entity Children where you want to trigger it (Workflow, Javascript function, etc.).

Parameters-Configuration
  • RecordInfo:

    • "RecordId" as string
      • example: D06F15DB-EEA5-4086-996B-47987DDB7628
    • "RecordUrl" (string)
      • example: https://myorg.crm.dynamics.com/main.aspx?etn=account&pagetype=entityrecord&id=%7B91330924-802A-4B0D-A900-34FD9D790829%7D
  • RelationshipName: schema-name of the relationship

    • required
    • example: contact_customer_accounts
  • UpdateInactive

    • false -> the link-entity is updated only if it is in an active state
    • true -> the link-entity is updated whatever its state is (active/inactive)
  • AttributesNameValue: a string containing a sequence of Attribute-Name/Attribute-Value

    • format: jdm_field1=>val1<>jdm_field2=>val2<>jdm_field3=>val3...
      • <> is a separator for the different Attribute-Name/Attribute-Value pair.
      • the value for the attributes is a normal string: it is parsed by the module to the proper attribute-type
      • to set a null value for an attribute, simply provide and "empty value":
        • example: jdm_field1=><>jdm_field2=><>jdm_field3=>val3

Back matter

Acknowledgements

Thanks to all who helped inspire this solution.

License

This project is licensed under the GPLv3.

d365-updateanyentity's People

Contributors

danielejdm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.