Open ranveer5289 opened 2 years ago
Ok, I figured it out.
It seems one of the fields on the contact record doesn't have proper field-level security set for the SF profiles like system admin.
When we use the GetRecord
element with the setting Automatically store all fields
it seems this internally loads/queries all the fields on that found Contact Record and since one of the field doesn't have proper security set the element GetRecord
was throwing an exception.
Still the exception was quite vague. Is there any reason why we use the Automatically store all fields
setting? Sounds a bit inefficient to query all fields when our only purpose is to check if contact with that ID exists or not.
Hello @ranveer5289, Thank you for opening this issue.
The b2c-crm-sync framework is using permission sets to grant users the access they need. Is your user part of this permission set? This might be the root cause of your issue.
Anyway, you are raising a really good point on the Automatically store all fields
setting. I'll review this and might provide a pull request to lower the scope of fields retrieved to only the record ID when required.
Thanks
Hello,
I am seeing the error when I try to register a new customer on the storefront. In case of registration, the person account is created in SF core but still flow
B2CCommerce_PlatformEvent_ProcessContactUpdate
ends up in error and the subsequent Quick Actions likeQuick Action (Publish to B2C Commerce Profile)
failsIn both scenarios, the flow is not able to get the record based on the recordId. We are using person accounts and the accounts are created properly in SF core.
Below is the error log in case of Registration
Below is the error log in case of Quick Action
This is a fresh installation on the SFDC sandbox and this sandbox is connected to SFCC sandbox.
I am very new to SF core so maybe I am missing something very obvious? One thing I already note is that when quick action has been invoked the ID shown in the flow debug logs
0017Z00001brrizQAA
is the ID of the Account and not the Contact0037Z00001MBRx2QAH
but I assume this is the standard setup of the connector as I didn't change anything.