Skip to content

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.

License

Notifications You must be signed in to change notification settings

danielejdm/D365-UpdateAnyEntity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages