Forums

Forums / Developing Portals / Anonymous users can't submit CRM form

Anonymous users can't submit CRM form

3 posts, 1 answered
  1. Eagle Lu
    Eagle Lu avatar
    4 posts
    Registered:
    09 Jun 2021
    14 Apr 2022
    Link to this post
    We have a form on our TPC portal which need the anonymous user to submit the form and create a record in CRM.

    But if you are not logged in, there will be an error after you click the submit button.

    "There was a problem with your submission. It has been added to the submission queue and will be reviewed manually."

    Here is the error log:
    Error Info
    Error Source: User
    Culture Info: en
    Machine Name: RD00155DB86351
    Windows Identity:IIS APPPOOL\********
    Error Line No:line 12
    Error Page URLhttps://*********/*************/AjaxSubmit
    Error Typepavliks.PortalConnector.Mvc.Engine.Data.CrmFormSubmissionManager+ProcessingException
    MessageProcessing Exception: Object reference not set to an instance of an object.
    Trace Info at pavliks.PortalConnector.Mvc.Engine.Data.CrmFormSubmissionManager.SubmitSection(ICrmConnection connection, FormLayoutSection section, FormCollection data, HttpFileCollectionBase files, Entity parentEntity, CrmFormSubmissionSettings submitSettings, IList`1& processedEntities) in C:\TeamCity\buildAgent\work\daebd48c1f8c846d\pavliks.PortalConnector.Mvc\Engine\Data\CrmFormSubmissionManager.cs:line 541 at pavliks.PortalConnector.Mvc.Engine.Data.CrmFormSubmissionManager.SubmitSections(IEnumerable`1 sections, FormCollection data, HttpFileCollectionBase files, CrmFormSubmissionSettings submitSettings, Boolean mockConnection) in C:\TeamCity\buildAgent\work\daebd48c1f8c846d\pavliks.PortalConnector.Mvc\Engine\Data\CrmFormSubmissionManager.cs:line 126

    So as a result, the anonymous user can't submit any information.

    This form can be submitted correctly after user login, but what we need is the anonymous user to submit the form.

    Is there any solution to this? When we are using the dynamics portal we can let anonymous users submit the form so I think the TPC should have some similar function too. 

    This is a form to create CRM record and our tpc version is 6.1.7700.121.

  2. Brady Ward
    Brady Ward avatar
    92 posts
    Registered:
    19 Aug 2021
    Answered
    14 Apr 2022 in reply to Eagle Lu
    Link to this post
    Hello Eagle,

    I've seen this occur as a result of Sitefinity permissions issues. If you navigate to the backend of your portal and go to Pages > On the right hand side you will see Permissions for all pages. Please make sure the setting for View Pages is set to Everyone. Even if the individual page is set properly, when submitting the TPC form it will still try to respect the Permissions for all pages value.

    Let me know if that helps at all,

    Brady
    TPC Web Developer
  3. Eagle Lu
    Eagle Lu avatar
    4 posts
    Registered:
    09 Jun 2021
    14 Apr 2022 in reply to Brady Ward
    Link to this post
    Hi Brady.

    Thanks for your help! Our problem is solved now.
     
    We used to set the Permissions for all pages to only allow authenticated users to view pages and set a few individual pages to be able to view by everyone and this is the reason for this issue.

    After changing the Permissions for all pages to allow everyone to view them, anonymous users now can submit CRM forms.
3 posts, 1 answered