I am working on a **Dynamics CRM CWA** that updates the "Modified By" field based on a text field called "Prepared By". I currently have 3 errors that I need some help debugging (see below). They may be pretty easy fixes but I am fairly new to coding. Any help de-bugging would be greatly appreciated. Thanks!

```
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Threading.Tasks;
using System.Activities;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Workflow;
using System.Runtime.Serialization;

namespace KED365.Workflows
{

    /// </summary>    
    public class ModifiedBy : WorkFlowActivityBase
    {
        private Guid contactid;

        [Input("User Full Name")]
        public InArgument<string> UserFullName { get; set; }

        /// <summary>
        /// Executes the WorkFlow.
        /// </summary>
        /// <param name="crmWorkflowContext">The <see cref="LocalWorkflowContext"/> which contains the
        /// <param name="executionContext" > <see cref="CodeActivityContext"/>
        /// </param>       
        /// <remarks>
        /// For improved performance, Microsoft Dynamics 365 caches WorkFlow instances.
        /// The WorkFlow's Execute method should be written to be stateless as the constructor
        /// is not called for every invocation of the WorkFlow. Also, multiple system threads
        /// could execute the WorkFlow at the same time. All per invocation state information
        /// is stored in the context. This means that you should not use global variables in WorkFlows.
        /// </remarks>
        protected override void Execute(CodeActivityContext activityContext, IWorkflowContext workflowContext, IOrganizationService orgService, ITracingService tracingService)
        {
            //get entity record for which plugin was fired
            Entity _target = (Entity)workflowContext.InputParameters["Target"];

            //check if portaluser name is to be obtained from custom createby or from custom modifiedby
            if (workflowContext.MessageName.ToUpper() == "CREATE")
            {
                contactid = _target.Attributes.Contains("new_createdby") ? _target.GetAttributeValue<EntityReference>("new_createdby").Id : Guid.Empty;
            }
            else
            {
                contactid = _target.Attributes.Contains("new_modifiedby") ? _target.GetAttributeValue<EntityReference>("new_modifiedby").Id : Guid.Empty;
            }

            //retrieve contact fullname from contactid
            var _contact = activityContext.CreateQuery("contact").Where(c => c.GetAttributeValue<Guid>("contactid").Equals(contactid)).FirstOrDefault();

            if (_contact != null)
            {
                if (_contact.Attributes.Contains("fullname"))
                {
                    fullname = _contact.GetAttributeValue<string>("fullname");
                }

                //retrieve Systemuser that has same name as that of new_portalcreatedby/ //new_portalmodifiedby
                Entity _user = context.CreateQuery("systemuser").Where(e => e.GetAttributeValue<string>("fullname").Equals(fullname)).FirstOrDefault();

                if (_user != null)
                {

                    //check if we need to update createdby or modifiedby
                    if (workflowContext.MessageName.ToUpper() == "CREATE")
                    {
                        _target["createdby"] = _user.ToEntityReference();
                    }
                    else
                    {
                        _target["modifiedby"] = _user.ToEntityReference();
                    }

                    //assign new target to plugin executioncontext
                    workflowContext.InputParameters["Target"] = _target;
                }
            }
        }
    }
}

```

**Error 1 :**

> 
> Severity Code Description Project File Line Suppression State
>  Error CS1061 'CodeActivityContext' does not contain a definition for 'CreateQuery' and no extension method 'CreateQuery' accepting a first argument of type 'CodeActivityContext' could be found (are you missing a using directive or an assembly reference?) Workflows C:\Users\tgiard\Downloads\GetUserByName-master\GetUserByName-master\Workflows\ModifiedBy.cs 68 Active
> 
> 
> 

**Error 2 :**

> 
> Severity Code Description Project File Line Suppression State
>  Error CS0103 The name 'fullname' does not exist in the current context Workflows C:\Users\tgiard\Downloads\GetUserByName-master\GetUserByName-master\Workflows\ModifiedBy.cs 75 Active
> 
> 
> 

**Error 3 :**

> 
> Severity Code Description Project File Line Suppression State
>  Error CS0103 The name 'context' does not exist in the current context Workflows C:\Users\tgiard\Downloads\GetUserByName-master\GetUserByName-master\Workflows\ModifiedBy.cs 79 Active
> 
> 
>