Forums

Forums / Bugs & Issues / Error on TPC Portal Registration

Error on TPC Portal Registration

10 posts, 1 answered
  1. Felipe Lima_2
    Felipe Lima_2 avatar
    6 posts
    Registered:
    23 Sep 2021
    01 Jun 2022
    Link to this post
    Hi, 

    I'm not able to use the TPC User Registration feature (the native one). I'm getting the following error message every time that I try to make a registration:

    "Your account was not created. Please try again.'Contact' entity doesn't contain attribute with Name = 'defaultpricelevelid' and NameMapping = 'Logical'. MetadataCacheDetails: ProviderType=Dynamic, StandardCache=True, IsLoadedInStagedContext = False, Timestamp=1255675, MinActiveRowVersion=1255675, MetadataInstanceId=36981117, LastUpdated=2022-05-31 01:49:40.587, OrgId=bb4aa35d-577f-4219-a489-348b1462bc3d"

    I'm using a CRM vanilla environment. Please see the versions below:

    Sitefinity v14.1.7824
    TPC v6.1.141.127
    CRM v9.2.22051.00142
    CRM TPC Solution v6.1.0.0

    I've just created a page and included the Portal Registration widget, defined basic properties such as what is the login page, roles and other default values. 

    Thanks
  2. Felipe Lima_2
    Felipe Lima_2 avatar
    6 posts
    Registered:
    23 Sep 2021
    01 Jun 2022
    Link to this post
    Based on Plugin Trace Logs inD365, seems that the plugin "pavliks.PortalConnector.Plugins.PrePortalUserCreate" is firing and throwing the exception below. 

    pavliks.PortalConnector.Plugins.PrePortalUserCreate is firing for Entity: pav_portaluser, Message: Create, Correlation Id: fc02a37d-78e7-4b82-9767-f026c0461158, Initiating User: 9c2d1f69-e7e0-ec11-bb3c-000d3adf77a2
    Error Message: 'Contact' entity doesn't contain attribute with Name = 'defaultpricelevelid' and NameMapping = 'Logical'. MetadataCacheDetails: ProviderType=Dynamic, StandardCache=True, IsLoadedInStagedContext = False, Timestamp=1255675, MinActiveRowVersion=1255675, MetadataInstanceId=37854351, LastUpdated=2022-05-31 01:49:40.587, OrgId=bb4aa35d-577f-4219-a489-348b1462bc3d Stack Trace: at Microsoft.CDSRuntime.SandboxWorker.SandboxCallbackService.<>c__DisplayClass14_0.<ExecuteCallBack>b__0() in C:\source\src\CDS.RunTime.Sandbox.Fabric\Microsoft.CDSRuntime.SandboxWorker\SandboxCallbackService.cs:line 109
    at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)
    at Microsoft.CDSRuntime.SandboxWorker.SandboxCallbackService.ExecuteCallBack(Func`2 callback, Func`2 HandleClientException) in C:\source\src\CDS.RunTime.Sandbox.Fabric\Microsoft.CDSRuntime.SandboxWorker\SandboxCallbackService.cs:line 88
    at Microsoft.CDSRuntime.SandboxWorker.SandboxOrganizationService.Execute(String operation, ByteString serializedRequest, Object traceSettings) in C:\source\src\CDS.RunTime.Sandbox.Fabric\Microsoft.CDSRuntime.SandboxWorker\SandboxOrganizationService.cs:line 47
    at Microsoft.CDSRuntime.SandboxWorker.SandboxOrganizationServiceWrapper.ExecuteInternal(OrganizationRequest request) in C:\source\src\CDS.RunTime.Sandbox.Fabric\Microsoft.CDSRuntime.SandboxWorker\SandboxOrganizationServiceWrapper.cs:line 226
    at Microsoft.CDSRuntime.SandboxWorker.SandboxOrganizationServiceWrapper.RetrieveInternal(String entityName, Guid id, ColumnSet columnSet) in C:\source\src\CDS.RunTime.Sandbox.Fabric\Microsoft.CDSRuntime.SandboxWorker\SandboxOrganizationServiceWrapper.cs:line 201
    at Microsoft.CDSRuntime.SandboxWorker.SandboxOrganizationServiceWrapper.Retrieve(String entityName, Guid entityId, ColumnSet columnSet) in C:\source\src\CDS.RunTime.Sandbox.Fabric\Microsoft.CDSRuntime.SandboxWorker\SandboxOrganizationServiceWrapper.cs:line 105
    at pavliks.PortalConnector.Plugins.PrePortalUserCreate.ExecutePostPortalUserCreate(IServiceProvider serviceProvider)
    Error Message: 'Contact' entity doesn't contain attribute with Name = 'defaultpricelevelid' and NameMapping = 'Logical'. MetadataCacheDetails: ProviderType=Dynamic, StandardCache=True, IsLoadedInStagedContext = False, Timestamp=1255675, MinActiveRowVersion=1255675, MetadataInstanceId=37854351, LastUpdated=2022-05-31 01:49:40.587, OrgId=bb4aa35d-577f-4219-a489-348b1462bc3d Stack Trace: at pavliks.PortalConnector.Plugins.PrePortalUserCreate.ExecutePostPortalUserCreate(IServiceProvider serviceProvider)
    at pavliks.PortalConnector.Plugins.Plugin.Execute(IServiceProvider serviceProvider)
    Exception: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: 'Contact' entity doesn't contain attribute with Name = 'defaultpricelevelid' and NameMapping = 'Logical'. MetadataCacheDetails: ProviderType=Dynamic, StandardCache=True, IsLoadedInStagedContext = False, Timestamp=1255675, MinActiveRowVersion=1255675, MetadataInstanceId=37854351, LastUpdated=2022-05-31 01:49:40.587, OrgId=bb4aa35d-577f-4219-a489-348b1462bc3d (Fault Detail is equal to Exception details:
    ErrorCode: 0x80041103
    Message: 'Contact' entity doesn't contain attribute with Name = 'defaultpricelevelid' and NameMapping = 'Logical'. MetadataCacheDetails: ProviderType=Dynamic, StandardCache=True, IsLoadedInStagedContext = False, Timestamp=1255675, MinActiveRowVersion=1255675, MetadataInstanceId=37854351, LastUpdated=2022-05-31 01:49:40.587, OrgId=bb4aa35d-577f-4219-a489-348b1462bc3d
    TimeStamp: 2022-06-01T16:39:15.0000000Z
    OriginalException: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: 'Contact' entity doesn't contain attribute with Name = 'defaultpricelevelid' and NameMapping = 'Logical'. MetadataCacheDetails: ProviderType=Dynamic, StandardCache=True, IsLoadedInStagedContext = False, Timestamp=1255675, MinActiveRowVersion=1255675, MetadataInstanceId=37854351, LastUpdated=2022-05-31 01:49:40.587, OrgId=bb4aa35d-577f-4219-a489-348b1462bc3d (Fault Detail is equal to Exception details:
    ErrorCode: 0x80041103
    Message: 'Contact' entity doesn't c...)., Correlation Id: fc02a37d-78e7-4b82-9767-f026c0461158, Initiating User: 9c2d1f69-e7e0-ec11-bb3c-000d3adf77a2
    Exiting pavliks.PortalConnector.Plugins.PrePortalUserCreate.Execute(), Correlation Id: fc02a37d-78e7-4b82-9767-f026c0461158, Initiating User: 9c2d1f69-e7e0-ec11-bb3c-000d3adf77a2
  3. Felipe Lima_2
    Felipe Lima_2 avatar
    6 posts
    Registered:
    23 Sep 2021
    01 Jun 2022
    Link to this post
    The same error message is experienced if I try to setup my custom registration page. Problems seems to be on the Portal User entity as indicated on the plugin from message above. 
  4. Vladyslav Makar
    Vladyslav Makar avatar
    20 posts
    Registered:
    16 Dec 2020
    17 Jun 2022 in reply to Felipe Lima_2
    Link to this post
    Good day Felipe,

    I hope you are doing well today!

    Can you verify if the "Contact" entity has the attribute with name="defaultpricelevelid" in the CRM, please?

    Best regards,

    Vlad
  5. Felipe Lima_2
    Felipe Lima_2 avatar
    6 posts
    Registered:
    23 Sep 2021
    23 Jun 2022 in reply to Vladyslav Makar
    Link to this post
    Hi Vladyslav,

    I don't have this attribute "defaultpricelevelid" on the Contact entity. I'm not sure if that's related, but this environment doesn't have any D365 Apps installed, it's a Dataverse vanilla instance.

    Can we remove the dependency on this attribute in order to use the user registration widget from TPC? 

    Thanks
    Felipe

     
  6. Vladyslav Makar
    Vladyslav Makar avatar
    20 posts
    Registered:
    16 Dec 2020
    23 Jun 2022 in reply to Felipe Lima_2
    Link to this post
    Greetings Felipe,

    Thanks for the provided information.

    You might be able to go around it with installation of the Sales App in your CRM.

    Alternatively, I would suggest you to email support@crmportalconnector.com and create a case, so developer can work with you 1-on-1 with you on your issue.

    Kindly,

    Vlad
  7. Felipe Lima_2
    Felipe Lima_2 avatar
    6 posts
    Registered:
    23 Sep 2021
    24 Jun 2022 in reply to Vladyslav Makar
    Link to this post
    Hi Vladyslav,

    Could you please clarify if the Sales App is a requirement for TPC? I haven't seen that on the TPC documentation. My project won't use the sales app, and it's not great to install it just to use the User Registration process in TPC - which I also don't understand why it has a dependency on that field of D365. 

    I suppose this will be a common issue to other customers, so I appreciate the response here on this public portal - that might be helpful to others :)

    Thanks
    Felipe

  8. Brady Ward
    Brady Ward avatar
    92 posts
    Registered:
    19 Aug 2021
    28 Jun 2022 in reply to Felipe Lima_2
    Link to this post
    Hello Felipe,

    While the Sales App is not necessarily a requirement for TPC, it does appear the the PostPortalUserCreate in the plugin does pull the defaulpricelevelid from the contact entity and obviously if this field doesn't exist, you will encounter the error you shared above.

    I've brought this to the attention of our product team as there was potential some oversight when the column set was defined in the plugin code. I will look to update this forum thread with more information when I have some (hopefully a build number for you to update to).

    Let me know if you have any other questions in the meantime,

    Brady
    TPC Web Developer
  9. Jenifer Smith
    Jenifer Smith avatar
    1 posts
    Registered:
    31 Jul 2022
    30 Jul 2022
    Link to this post
    Hi! I have the same problem with registration, can't solve it.

    Jenifer. marketing manager
    WorkTime
    Last modified on 15 Aug 2022 12:08 by Jenifer Smith
  10. Felipe Lima_2
    Felipe Lima_2 avatar
    6 posts
    Registered:
    23 Sep 2021
    Answered
    01 Aug 2022 in reply to Jenifer Smith
    Link to this post
    I've solved this issue by recreating my environment on Power Platform Admin Portal, selecting the option "Enable Dynamics 365 apps = Yes". You don't necessarily need to select an App, just this flag. 

    https://docs.microsoft.com/en-us/power-platform/admin/create-environment
    Last modified on 01 Aug 2022 13:08 by Felipe Lima_2
10 posts, 1 answered