Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Custom Workflow Activity Query

Posted on by 445

Hello Experts,

im writing my first Custom Workflow Activity and i have a problem with my query.
I always get an error at "provdaten.Einlösequote = "mrd_ekv_wert_provision_mr" and at my return.

The Class "Provisionsdaten" is not valid in the given context and i think the "mrd_ekv_wert_provision_mr" is wrong declared.

Can anyone help me?

Kind Regards,

Léon

        // Einlösequote ermitteln

        internal Provisionsdaten GetEinloesequte(Guid produkthersteller, DateTime datum)
        {
            Entity einloesequoten = new Entity();
            QueryExpression query = new QueryExpression("mrd_ekv_einloesequoten");
            query.ColumnSet = new ColumnSet(true);
            Provisionsdaten provdaten = new Provisionsdaten();


            query.Criteria.AddCondition("mrd_ekv_hersteller", ConditionOperator.Equal, produkthersteller);
            query.Criteria.AddCondition("mrd_ekv_datum_von", ConditionOperator.GreaterThan, datum);
            query.Criteria.AddCondition("mrd_ekv_datum_bis", ConditionOperator.LessThan, datum);
            // query ausführen


            provdaten.Einloesequote = "mrd_ekv_wert_provision_mr";

            return Provisionsdaten;
        }


*This post is locked for comments

  • Verified answer
    Kevin Grech Profile Picture
    Kevin Grech 380 on at
    RE: Custom Workflow Activity Query

    replace "return Provisionsdaten;" with "return provdaten;". Please note that you're not executing the query in that code block.

  • Friyank Profile Picture
    Friyank 944 on at
    RE: Custom Workflow Activity Query

    What is the error and please upload full code with context.

    Possible, please share screenshot of the error.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans