web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Get Data in Custom Workflow Activity

(0) ShareShare
ReportReport
Posted on by 445

Hello Experts,

i want to get an Email Adress from a related Account and try to do that with a custom workflow.

But i work with C# for the first time ^^ so i need a little bit help to get this done.

How i get Data from an Entity in C#?

Regards

Léon

*This post is locked for comments

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    You can start here - msdn.microsoft.com/.../gg334383.aspx

  • Verified answer
    ArdantHammer Profile Picture
    372 on at

    Are you trying to get a email address from an account that is linked directly to the entity you are running the workflow on? You may not need a custom workflow if for instance you are working on a contact and you want the email address of the account in the "Company Name" field.

  • BlackBeard Profile Picture
    445 on at

    Hello,

    so i found an easier solution for my problem.

    Now i try to filter Accounts with the businesstypecode '2' in a Account lookup field.

    But i allways get the error that my filter is not defined...

    function AddFilter() {
    
        Xrm.Page.getControl("mrd_ekv_autohaus").addPreSearch(Filter.autohausFilter);
        
         //Add filter to Autohaus
        var autohausFilter = "<filter type='and'><condition attribute='businesstypecode' operator='eq' value='2'/></filter>";
    }


    Can anybody help me?

    Regards
    Léon

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Try to use something like following:

    function AddFilter() {

    Xrm.Page.getControl("mrd_ekv_autohaus").addPreSearch(function(){

    var autohausFilter = "<filter type='and'><condition attribute='businesstypecode' operator='eq' value='2'/></filter>";

    Xrm.Page.getControl("mrd_ekv_autohaus").addCustomFilter(autohausFilter);

    });

    }

  • BlackBeard Profile Picture
    445 on at

    Thank you Andrew :)

    It works perferctly :)

    Have a nice day!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans