Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to Call Action from Console App

Posted on by Microsoft Employee

Hi everyone ,

While i was going through Actions in Microsoft CRM , i was having trouble in calling it through Console app.

I would like to share the answer  with everyone.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to Call Action from Console App

    sorry i saw your post late.. Great it has worked for you.

  • awalters Profile Picture
    awalters 3,079 on at
    RE: How to Call Action from Console App

    Never mind - I actually had to manually add Target as an input parameter on the action.  I'd gotten the impression elsewhere that that was there by default...

    ETA:  Poking further, I think that the issue was that the action I was testing on was set to be global (i.e. not for a specific entity).  In that case, it let me add a Target parameter, and activate and run the action.  However, as soon as I went to add steps to it, every possible thing I did was giving me a super non-descriptive error, so something's weird there.

    However, I was able to create a new test action for a specific entity, and now it appears that Target is there without me having to add it, as I thought originally.

  • awalters Profile Picture
    awalters 3,079 on at
    RE: How to Call Action from Console App

    What version of CRM are you running?  We're running 8.2, and I'm getting the error "Unrecognized request parameter: Target" when I try this.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to Call Action from Console App

    For more Information use this link

    deepakexploring.wordpress.com/.../calling-actions-from-plugin-in-crm-2013

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to Call Action from Console App

    solution of the problem would be

    // Calling the Action - new_callMessage

    OrganizationRequest req = new OrganizationRequest("new_callMessage");

    req["ActionCall"] = "This is a test operation for using Actions in CRM 2016 "; //action name

    req["Target"] = new EntityReference("opportunity", opportunity.Id); //entity name and entity Guid

    //execute the request

    OrganizationResponse response = service.Execute(req);

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