Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

web api call to custom action from javascript not working

  • 1.  web api call to custom action from javascript not working

    SILVER CONTRIBUTOR
    Posted May 29, 2019 10:43 AM
    I am unable to call custom action from JavaScript through web api. I am getting "Resource not found for the segment" error.
    Does anyone faced similar issues?


    ------------------------------
    Jeebo Mathews
    Agricorp
    ------------------------------


  • 2.  RE: web api call to custom action from javascript not working

    MICROSOFT MVP
    Posted May 29, 2019 11:44 AM
    Hello,
    My recommendation is to use this tool to compose the stub for your JS.

    ------------------------------
    Andrew Butenko
    ------------------------------



  • 3.  RE: web api call to custom action from javascript not working

    SILVER CONTRIBUTOR
    Posted May 29, 2019 02:33 PM

    Hi Andrew,

     

    What are the steps to use it.

    It is zip file which comprises of css, html etc files.

     

    Thanks for your immediate response.

     

    Regards

     

    Jeebo

     






  • 4.  RE: web api call to custom action from javascript not working

    SILVER CONTRIBUTOR
    Posted May 29, 2019 03:18 PM
    ​Hi Andrew,

    I imported the managed solution into my CRM. I could see My custom action in CRM rest builder tool.
    Let me test it first.

    Thanks



    ------------------------------
    Jeebo Mathews
    Agricorp
    ------------------------------



  • 5.  RE: web api call to custom action from javascript not working

    SILVER CONTRIBUTOR
    Posted May 30, 2019 11:05 AM
    ​Thanks Andrew it worked. the problem was the entities plural name on which the custom action is build.
    Once the CRMRestBuilder is able to track the custom action. my task become much more easy as I was able to change my web api url.




    ------------------------------
    Jeebo Mathews
    Agricorp
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role