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)

Custom Action Cannot Be Called From WebAPI

(0) ShareShare
ReportReport
Posted on by

I have developed an unbound custom action.  At this point it does nothing more than set and return a string argument.  I can see the action in the $metadata file.

<ComplexType Name="sos_GetJobByPOResponse">
   <Property Name="PurchaseOrder" Type="Edm.String" Nullable="false" Unicode="false"/>
</ComplexType>
<Action Name="sos_GetJobByPO">
  <ReturnType Type="mscrm.scs_GetJobByPOResponse" Nullable="false"/>
</Action>

When I call the action through a web api call - https://[my instance].api.crm.dynamics.com/api/data/v8.2/sos_GetJobByPO - I get the following response:

{
    "error": {
        "code": "",
        "message": "No HTTP resource was found that matches the request URI 'http://[my instance ].api.crm.dynamics.com/api/data/v8.2/sos_GetJobByPO'."
    }
}

Any ideas on what I need to do to get the Web API call to work?

*This post is locked for comments

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

    Hello,

    Can you please post a screenshot of your action?

  • Suggested answer
    SCV Profile Picture
    1,004 on at

    Try changing your url to this and see:

    http://[my instance ].api.crm.dynamics.com/api/data/v8.2/Microsoft.Dynamics.CRM.sos_GetJobByPO

  • Nithya Gopinath Profile Picture
    17,078 on at

    Hi Lynn,

    Is the custom action a global one or entity specific one?

    If it is a Global Action, you can use the URL below.

    https://[my instance].api.crm.dynamics.com/api/data/v8.2/sos_GetJobByPO

    If it is an Entity-Specific Action, you should use the URL below. 

    https://[my instance].api.crm.dynamics.com/api/data/v8.2/accounts(DE57510E-59A3-E511-80E4-3863BB35AD90)/Microsoft.Dynamics.CRM.sos_GetJobByPO

    In the above URL, accounts should be replaced by the logicalName of the entity of action appended with 's' and DE57510E-59A3-E511-80E4-3863BB35AD90 is the GUID of the entity record you need to perform the entity-specific action.

    Hope this helps.

  • Community Member Profile Picture
    on at

    Here is the screen shot of the action

  • Community Member Profile Picture
    on at

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

    Still not visible...

  • Community Member Profile Picture
    on at

    This is an unbound action.

  • Community Member Profile Picture
    on at

    I tried that.  It did not work.  The response I got was the same one I get when I put in an invalid action name.  I think you only need to fully qualify bound actions.

  • Suggested answer
    Lukasz Kowalski-Glikman Profile Picture
    on at

    Digging up an old thread here, but just had the same issue. The solution was to put the action name in lower case. Not sure why this should matter in a URL, but it does.

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