You need to sign in to do that
Don't have an account?
Nicholas Ferguson
Unexpected Error when retrieving 'User' Layout Information
When attempting to populate the value of a User lookup field via the 'value' attribute, I receive the following error:
html
JS
The stickler is that this code previously worked. I only found this issue when returning to this form to test an unrelated workaround (changing a manual sharing rule from a flow to a trigger).
Any idea why this is happening?
lookup.js:1 Uncaught (in promise) Error: LWC component's @wire target property or method threw an error during value provisioning. Original error: [Unexpected Error when retrieving 'User' Layout Information ]The dumbed down code looks something like this:
html
<lightning-input-field field-name="Submitter__c" value={submitter}></lightning-input-field>
JS
import { LightningElement, api, wire, track } from 'lwc'; import Id from '@salesforce/user/Id'; export default class EditableForm extends LightningElement { @track submitter = Id; }
The stickler is that this code previously worked. I only found this issue when returning to this form to test an unrelated workaround (changing a manual sharing rule from a flow to a trigger).
Any idea why this is happening?
It's still not totally clear (to me) why the field works without the layout assigned but only fails when a value is assigned to the field. I hope this helps someone else in the future!
All Answers
If not, please let me know what you meant. Thanks!
Hi Nicholas Ferguson,
Is this the only code in the component. I think the error is from other part of the code where @wire is being used. Please post the whole code if there is something else in the component.
Thank you,
Vinay.
There is more to the code. However, if I comment out '@track submitter = Id;', I get no errors (as I'm no longer setting a value to the input field). So, I know the issue is related to this. This is why I 'dumbed down' my code so it doesn't over complicate the post.
It's still not totally clear (to me) why the field works without the layout assigned but only fails when a value is assigned to the field. I hope this helps someone else in the future!