Forums

Forums / Developing Portals / Calling dynamics Custom Action from Portal Connector

Calling dynamics Custom Action from Portal Connector

Thread is closed for posting
2 posts, 1 answered
  1. mallikarjun H
    mallikarjun H avatar
    2 posts
    Registered:
    04 Feb 2019
    07 Feb 2019
    Link to this post
    Hi,

    We have a scenario where we want to get the response from the dynamics on submitting a form. We decided to call the dynamics custom action to achieve this. But we get unauthorized error when we make a api call from the java script on the portal side. We did set up the web api connection configuration in the connector, but still unable to get this working.

    Any suggestions would help us proceed on this.
  2. Josh
    Josh avatar
    47 posts
    Registered:
    01 Jun 2018
    Answered
    29 Oct 2019 in reply to mallikarjun H
    Link to this post

    Hello Mallikarjun,

    After a form has been submitted you can check the response that was provided from CRM in two different ways. The first is through the “tpc:post-submit” JavaScript event and the second way is through the ITpcPostMvcFormSubmitEvent Sitefinity Event in custom C# code.

    tpc:post-submit – In the tpc:post-submit JavaScript event, the 3rd argument of the event handler will receive the request if the form submission failed, and it will receive a JSON string containing the response (processing steps) from CRM if the form submission was successful.

    ITpcPostMvcFormSubmitEvent – In the ITpcPostMvcFormSubmitEvent Sitefinity event, the event contains a property called Message which indicates the action was performed on the entity in CRM, as well as SubmittedEntity which contains the Entity on which the action was performed.

    More information on these TPC Form Submission Events can be found here: https://www.crmportalconnector.com/developer-network/documentation/developing-for-tpc/portal-form-submission-events

    If you have any other questions please feel free to reply to this thread, or for more complex issues you can email support@crmportalconnector.com.

    Cheers,

    Josh

2 posts, 1 answered