locked
How to consolidate all my points per user? RRS feed

  • Question

  • Hello to all... I was creating my computation... but i cant consolidate all the  point earned by each member... is there anyone could help me... I was wondering to use a query..
    Please help me to create a query to consolidate all... Thank you....


    using System;
    using System.Collections;
    using System.Workflow.ComponentModel.Compiler;
    using System.Workflow.ComponentModel.Serialization;
    using System.Workflow.ComponentModel;
    using System.Workflow.ComponentModel.Design;
    using System.Workflow.Runtime;
    using System.Workflow.Activities;
    using System.Workflow.Activities.Rules;
    using System.Reflection;

    using Microsoft.Crm.Workflow;
    using Microsoft.Crm.Sdk;
    using Microsoft.Crm.SdkTypeProxy;
    using Microsoft.Crm.Sdk.Query;

    namespace CPEComputation.workflow
    {
        [CrmWorkflowActivity("CPE Computation", "Programing Microsoft CRM4")]
        public class CPECredits : Activity
        {
            [CrmInput("CPE Credits")]
            public Lookup CPECredit
            {
                get
                {
                    return (Lookup)base.GetValue(CPECreditProperty);
                }
                set
                {
                    base.SetValue(CPECreditProperty, value);
                }

            }

            public static DependencyProperty CPECreditProperty =
               DependencyProperty.Register("CPE Credits",
               typeof(CrmNumber),
               typeof(CPECredits));


            public static DependencyProperty resultProperty = DependencyProperty.Register("result",
                typeof(CrmNumber),typeof(CPECredits));

            [CrmOutput("result")]
            public CrmNumber result
            {
                get
                {
                    return (CrmNumber)base.GetValue(resultProperty);
                }
                set
                {
                    base.SetValue(resultProperty, value);
                }

            }

            protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
            {


                result = new CrmNumber(CPECredit.Value + EarnedCredits.Value);
                return base.Execute(executionContext);
            }

        }
    }
    Zosimo D. Recio Jr. Microsoft Certified (Business Management Solutions specialist)
    Monday, June 22, 2009 6:02 AM

Answers

  • Hi, you may try this approach
    http://community.dynamics.com/blogs/crmmitchmilam/comments/10601.aspx
    Tuesday, June 23, 2009 11:32 AM