Custom WorkFlow Activities Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/microsoft-dynamics-365/custom-workflow-activities/ Microsoft Dynamics CRM . Microsoft Power Platform Thu, 09 Jul 2020 16:47:33 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/cropped-Microsoftdynamics365-blogs.png?fit=32%2C32 Custom WorkFlow Activities Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/microsoft-dynamics-365/custom-workflow-activities/ 32 32 176351444 Error : The property is of type EntityReference but doesn’t contain the ReferenceTarget attribute http://microsoftdynamics.in/2020/07/09/error-the-property-is-of-type-entityreference-but-doesnt-contain-the-referencetarget-attribute/ Thu, 09 Jul 2020 16:47:33 +0000 http://microsoftdynamics.in/?p=3879 While registering a custom Workflow Activity we can get below error if we are missing Reference Target entity

The property lookup from Configration Entity is of type EntityReference but doesn't contain the ReferenceTarget attribute

Code with missing reference Target or Code with Error

The post Error : The property <name> is of type EntityReference but doesn’t contain the ReferenceTarget attribute appeared first on Microsoft Dynamics 365 Blog.

]]>

If we are getting below error while registering a custom Workflow

The property from is of type EntityReference but doesn't contain the ReferenceTarget attribute

Then we are missing Reference Target Parameter

While registering a custom Workflow Activity we can get below error if we are missing Reference Target entity

The property lookup from Configration Entity is of type EntityReference but doesn’t contain the ReferenceTarget attribute

  • Code with missing reference Target or Code with Error

  using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Microsoft.Xrm.Sdk;
    using Microsoft.Xrm.Sdk.Workflow;
    using System.Activities;
    using Microsoft.Xrm.Sdk.Query;

    public class ViolationCreateOppProductandSalesOrde : CodeActivity
    {
    
        #region InputParameter
        /// <summary>
        /// Opportunity LookUp as an input parameter
        /// </summary>
        [RequiredArgument]
        [Input("Lookup Schema Name")]
        public InArgument<EntityReference> Configration{ get; set; }

------------------------------
---------
-------------------------------
  • Code Corrected and Added Reference Target ( Tat will contain Target entity name)
  using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Microsoft.Xrm.Sdk;
    using Microsoft.Xrm.Sdk.Workflow;
    using System.Activities;
    using Microsoft.Xrm.Sdk.Query;

    public class ViolationCreateOppProductandSalesOrde : CodeActivity
    {
    
        #region InputParameter
        /// <summary>
        /// Opportunity LookUp as an input parameter
        /// </summary>
        [RequiredArgument]
        [Input("LookUP")]
        [ReferenceTarget("opportunity")]
        public InArgument<EntityReference> Configration { get; set; }

------------------------------
---------
-------------------------------

Hope this was Help Full.

Thanks

The post Error : The property <name> is of type EntityReference but doesn’t contain the ReferenceTarget attribute appeared first on Microsoft Dynamics 365 Blog.

]]>
3879