CRM Blog

Valcore ApS Logo (c) Valcore ApS 2012

Dynamics Dev Tweaks

To share my solutions/tweaks while developing solutions for dynamics 365 problems that i thing might be helpful / interesting for the audience

Using CRM Actions to overcome workflow limitation of access to main or related entities

Limitation:
One of the workflow limitations is; it does not support access to its next related entity. One can only access the main entity or the related entities but not next related entity.

Example:
we have 3 entities Account, Contact and CustomEntityA.
Account is related to Contact and Contact is related to CustomEntityA. Account is not directly related to CustomEntityA.

AccountContactCustom

If we want to update a field e.g. description on CustomEntityA on update of the description of Account, or if we want to update Account’s description from CustomEntityA’s description, we cannot do it with OOB workflow. We can either write plugin/customWorkflowActivity or there is another option without coding anything which is combination of Action and Workflow.

Bellow is an example of how to access next related entity using custom action and workflow.

  1. Create a crm process of type Action with two input parameters of entityreference type for those entities that are not directly related e.g. Account and CustomEntityA. Include necessary steps as required by business logic. Her is an example of such Action process:

    In the example below our CustomEntityA is AccContactDesc and we will be updating its description from the description of account as soon the account description changes. 
    Here is the screenshot of worflow of type Action

    cawf

    Properties of update step:
    cawf2


  2. Create a process of type workflow and call Action process(created in Step.1 ) passing parameter.

    wfca3

    Properties of calling action in workflow.

    waca4

    Here are the results: after updating the account’s description the workflow updates the description of AccContactDesc which is related to this account's primary contact.

    cafinal
    As we can see our custom entity AccContactDesc is not directly related to account but next-related through Account's primary contact. We can still access it using combination of workflow and actions.
       
  Tekstfelt: Account
    Tekstfelt: Contact
 
 
  Tekstfelt: CustomEntityA

       
   
Dynamics 365 klienten til Microsoft Outlook kan ik...
Button(Ribbon) to Call plugin (pass parameters and...
 

Comments

No comments made yet. Be the first to submit a comment
Vores adresse:
Industrivej 48
4000 Roskilde, Danmark
Telefon: +45 70 22 14 64
E-mail: Denne e-mail adresse bliver beskyttet mod spambots. Du skal have JavaScript aktiveret for at vise den.
CVR nr.: 34472726
Åbningstider:
Mandag til Torsdag kl. 09.00 - 16.00
Fredag kl. 09.00 - 15.30
Weekend lukket

Kig forbi!

Hos Valcore er du altid velkommen til at kigge forbi til en kop kaffe og en gennemgang af Microsoft Dynamics CRM. Vi brænder for CRM og vi er gode til at skabe en god forståelse for hvordan CRM kan bruges i en virksomhed, hvad enten der er fokus på salg, marketing, service eller noget helt andet!