CRM Extensions, Tools

Ultimate Workflow Toolkit v1.5.0.0

New release of Ultimate Workflow Toolkit is available.

On one hand this release contains a lot of new cool features. On the other this release is not directly compatible with earlier versions. I will provide guide that will describe how to install this version if you have earlier versions installed already.

Here is what I’ve done so far:

  1. I merged relationship-related (N-1 and N-N) operations with View-Oriented operations.
  2. Distribute Action feature was added. Configuration is not that easy though but it works perfectly and does what it should.
  3. Update of child records prepared based on configurable list of other entity/generic list of values.
  4. Geolocation of address using BingMaps services.
  5. Convertion of attachments from one format to another using CloudConvert service (up to 25 free conversions).
  6. Duplicate detection – results can be sent as a list of urls or embedded to an email as a table with results.
  7. Add Business Days to date with possibility to define weekends (for some countries weekends are Thursday-Friday or Friday-Saturday) and even holidays (you can use custom entity for storing of holidays plus FetchXml query to pass it inside Workflow Step).

45 Comments on “Ultimate Workflow Toolkit v1.5.0.0

  1. Hi Andrii,

    Thank you for sharing your awesome job with Ultimate Workflow Toolkit!

    I tried to find examples how to use Ultimate Workflow Toolkit steps. For instance, UWT: Request Builder:Build Request From Entity. But could not find any user guide how to use it.

    Do you have any use guide?

    Thanks.

    Best,
    Aliona

    1. Hello Aliona,
      Documentation is on the way. I will work on it and you can find it on GitHub Wiki.
      Thanks,
      Andrew

      1. I would love to use this tool. Where is the documentation on GitHub Wiki?
        I want to use this to Inactivate Connection records when the related entity record is Inactivated.
        (e.g., when a Contact is Inactivated, Connections to the Contact would be inactivated). Thanks!

        1. Thanks for providing this tool. I created a new Process on our custom entity “Site” (et_site) to Start when: “Record status changes”. I added one step: “UWT: Bulk Operations: Cascade Status”
          Properties of the step:
          State Code for Child Record: 1, Status Code for Child Record: 2, Record: {Record URL(Dynamic)(Site)}, Relationship Name: et_site_connections2, Continue After First Error: True, Throw an Exception on Error: True.
          I tried deactivating some Site (et_Site) records, but the Process was not triggered.

        2. Yes, I activated the workflow before attempting to trigger it by Deactivating a record.

        3. Where can I share a screenshot? Email address?
          The Workflow Job Associated View shows:
          “No System Job records are available in this view.”

          Workflow Job Retention is set to not Automatically delete completed workflow jobs.

        4. YES! That worked! I was Deactivating a record I didn’t Own, so the process didn’t trigger. Changing it to Organization let the process run. The Cascading Inactivation of the related record worked! Happy Dance! Thank you!

  2. Hi Andrew,

    Great job and thank you very much.
    I would like to ask about Multiselect OptionSet function, the usage of and how to use Get Field Label, Field Contains All Values, and difference between “Set Field Value” and “Add Values to Field”?

    Best,
    CRMist

    1. Hello,
      “Get Field Label” returns concatenated Labels of all Optionset values selected.
      “Field Contains All Values” – returns boolean value that define if all values you passed to input selected in field.
      Difference between “Set Field Value” and “Add Values to Field” – let’s assume that you have optionset with Red, Yellow and Green options and Red and Yellow are selected. If you use “Set Field Value” and pass “Green” then new field value will be just “Green” but if you add “Add” with the same “Green” – the result will be “Red”, “Yellow” and “Green”.
      Thanks,
      Andrew

      1. thanks Andrew, now clear now.

        A different question, is there a function to share secured fields? I have seen the one to share record, but i didnt see any for share secured fields. Did i miss anything?

        1. Hello,
          There are steps to share secured fields – UWT: Security: Share Secured Fields with User/Team.
          Thanks,
          Andrew

  3. Great. Very handy step.

    When i use the UWT: Security: Share Secured Fields with Team, i get this message:
    Unhandled Exception: Microsoft.Crm.CrmException: System.NullReferenceException: Microsoft Dynamics CRM has experienced an error.

    In the workflow properties, i made sure that all 6 columns are filled up – Team, Record Reference, Field List(with just one field schema name), Read Access, Write Access, and Throw error. Any idea why?

      1. Hi Andrew,

        Sure, i uploaded to https://ibb.co/cbbSZd

        Now I test it out using UWT: Security: Share Secured Fields with User instead of Team, and get the NullReferenceException too.

        Tha {Share FLS User(Account)} is a lookup field to user. The rest are self-explanatory.

  4. Hi Andrew,

    the Message Block is empty, i pasted the Exception Details below:

    Unhandled Exception: System.ServiceModel.FaultException1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.NullReferenceException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #588AA906Detail:

    19b08594-f7a2-4c9a-a4ba-42654aa15ce7
    -2147220970

    System.NullReferenceException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #588AA906
    2018-06-20T07:01:55.1278114Z
    false
    PluginExecution

    System.Reflection.TargetInvocationException
    at System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component)
    at System.Activities.Activity.ReflectedInformation..ctor(Activity activity, ReflectedType reflectType)
    at System.Activities.CodeActivity.CacheMetadata(CodeActivityMetadata metadata)
    at System.Activities.CodeActivity.OnInternalCacheMetadata(Boolean createEmptyBindings)
    at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList
    1& validationErrors)
    at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack1& activitiesRemaining, ActivityCallStack parentChain, IList1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)
    at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors)
    at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList
    1& validationErrors)
    at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)
    at System.Activities.WorkflowApplication.EnsureInitialized()
    at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)
    at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary
    2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)
    at System.Threading.Tasks.Task1.InnerInvoke()
    at System.Threading.Tasks.Task.Execute()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.Execute(IOrganizationServiceFactory organizationServiceFactory, String customActivityTypeName, IExecutionContext requestContext, Dictionary
    2 sandboxServices, Boolean useDrawbridgeEnabled, Boolean chaosFailAppDomain)
    at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.Execute(IOrganizationServiceFactory organizationServiceFactory, String customActivityTypeName, IExecutionContext requestContext, Dictionary`2 sandboxServices, Boolean useDrawbridgeEnabled, Boolean chaosFailAppDomain)
    at Microsoft.Crm.Sandbox.SandboxWorker.ExecuteCustomWorkflowActivity(SandboxCallInfo callInfo, SandboxCustomActivityExecutionContext requestContext, Guid pluginAssemblyId, Int32 sourceHash, String assemblyName, Guid pluginTypeId, String pluginTypeName, SandboxRequestCounter& workerCounter, Boolean returnTraceInfo)

    Server stack trace:
    at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
    at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    at Microsoft.Crm.Sandbox.ISandboxHost.ExecuteCustomWorkflowActivityAndReturnTraceInfo(SandboxCallInfo callInfo, SandboxCustomActivityExecutionContext requestContext, Guid pluginAssemblyId, Int32 sourceHash, String assemblyName, Guid pluginTypeId, String pluginTypeName, String assemblyContents, Boolean returnTraceInfo)
    at Microsoft.Crm.Sandbox.SandboxCustomActivity.Execute(SandboxClient client, SandboxCallTracker callTracker, IExecutionContext requestContext, String assemblyContents, Boolean returnTraceInfo)
    at Microsoft.Crm.Sandbox.SandboxCodeUnit.Execute(IExecutionContext context)

    1. Hello,
      This is weird that you get this error and log unfortunately doesn’t say a lot to me. What timezone are you at? I want to take a look at.
      Andrew

      1. Hi Andrew,
        My time now is 11pm. So do you mean it is working fine in your enviroment? If yes, i will then try again in other environment.

        Another question on UWT: Request Builder:Set Lookup Field 🙂
        May i know is it right to just use this step to update a lookup field, by passing {id: “Record Guid”, entityType: “account”} to “Field Value” parameter?

        1. I try not to publish anything that I haven’t tested successfully. So answer – yes, it was tested and considered as working as it was expected.
          Regarding Request Builder: Set Lookup value – yes, it should work that way. But at the moment you can use Request Builder only for distributing of action among recordset or bulk update of recordset. If this is how you plan to use it – then it should work fine.

  5. Hello Andrew,

    I’m trying to use your Distribute Workflow code but I’m not having much success.
    I want to fire off a workflow on phonecalls after an account field is updated. I’ve selected my workflow in your plugins interface but I dont know what to put in the fields of “Record” and “Relationship Name”.
    I think i have the Relationship Name correct with ‘Account_Phonecalls’ but the ‘Record’ field has me stumped.
    I’ve tried these: phonecall, Phonecall, PhoneCall and Phonecalls.
    No matter which one i try i get an error in the workflow: ype is not resolved for member ‘Newtonsoft.Json.JsonReaderException,….

    Can you tell what I’m dong wrong?

    thanks!

  6. Hello Andrew,

    I’m trying to use your Distribute Workflow code but I’m not having much success.
    I want to fire off a workflow on phonecalls after an account field is updated. I’ve selected my workflow in your plugins interface but I dont know what to put in the fields of “Record” and “Relationship Name”.
    I think i have the Relationship Name correct with ‘Account_Phonecalls’ but the ‘Record’ field has me stumped.
    I’ve tried these: phonecall, Phonecall, PhoneCall and Phonecalls.
    No matter which one i try i get an error in the workflow: Type is not resolved for member ‘Newtonsoft.Json.JsonReaderException,….

    Can you tell what I’m dong wrong?

    thanks!

      1. Hi Andrew,
        Thanks for the reply!
        Yes, after I posted that I changed to the dynamicRecord for the Record but now I have different errors.
        If I use the ‘Account_Phonecall’ relationship I get this error:
        ‘PhoneCall’ entity doesn’t contain attribute with Name = ‘phonecallid’ and NameMapping = ‘Logical’.
        And since this is an activity and there isn’t a field ‘phonecallid’ I tried using the Activity relationship, ‘Account_ActivityPointers’.
        When I try it that way the error is: ‘ActivityPointer’ entity doesn’t contain attribute with Name = ‘activitypointerid’ and NameMapping = ‘Logical’. ;
        I wish I could specify the id field it should be looking for (activityId) but of course I cant.
        Any idea what I should try now?

        thanks!

        1. Update: I tried to use fetchXML instead and I had partial success. If the fetchxml specifies the regardingobjectid (which is the accountid) then it processes correctly and the workflow I’ve specified runs on the phone call records for that account.

          So how do I pass the dynamicRecordUrl (or equivalent) into the Fetchxml?

          thanks!

        2. David,
          In this can you can extract id of account using UWT: Core Operations -> Get Record Id. You will have to pass Dynamic Record Url inside and in output you’ll get record id that you can combine with your query.
          Andrew

  7. Hi Andrew,

    Thanks for the replies!

    1. I don’t think you really explained how to update my fetchxml to receive the recordUrl.

    2. I downloaded your source code and have adjusted accordingly to fit my needs. The fetchxml in the BulkOperationBase needed to be updated to NOT assume the Id field was just the entity name with “Id” at the end.

    Thanks for your efforts but I’m all set now!
    -David

  8. In trying to use “Add User to Record Team” I encountered an error when trying to choose the Team (Access Team) in the workflow designer – when trying to use the search on the entry field. “To use this saved view, you must remove criteria and columns that refer to deleted or non-searchable items. If you contact support, please provide the technical details. …

    The returned ErrorDetails were:
    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Server was unable to process request.Detail:

    d48d425e-5fb6-4f75-9083-b31798504446
    -2140991216

    Server was unable to process request.
    2018-10-18T19:52:44.2272002Z
    false

    System is Dynamics 365 OnLine v9

    Any ideas as to the cause/solution???

  9. Hi Andrij.
    Thank you for your tools!
    My question: your wrote -“I will provide guide that will describe how to install this version if you have earlier versions installed already.” I have earlier version of UWT. Could you please provide any user guide – how I can install the last version? Thank you!

  10. I’m nor sure that my previous comment was published.
    Andrij, thank you for your UWT kit!
    My question : you wrote – “I will provide guide that will describe how to install this version if you have earlier versions installed already.” Could you please provide link where I can read this instruction?
    Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.