• Nicholas Ferguson
  • NEWBIE
  • 15 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies
When attempting to populate the value of a User lookup field via the 'value' attribute, I receive the following error:
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? 
I'm attempting to write a trigger on 'before insert' and 'before update' for ObjectA__c. In my code I have a need to find related records based on a custom lookup field. 

ObjectA__c has a custom field we'll call ObjVersion__c.
ObjectB__c also has a custom field we'll also call ObjVersion__c.

Both of these lookup fields are related to a custom object 'Version__c'.

When ObjectA__c is inserted or updated, I'd like to look at the ObjVersion__c field on the update and find all the ObjectB__c that also have that relationship to that Version__c object.
 
List<ObjectB__c> areas = [
        SELECT Name, ObjVersion__c FROM ObjectB__c
        WHERE ObjVersion__c
        IN :Trigger.New];

However, I get an error stating:
Invalid bind expression type of ObjectA__c does not match domain of foreign key

What would be the proper way to accomplish this in a SOQL?
I'm attempting to use getRecord from uiRecordApi to get a knowlege article version. I'm able to get most fields. However, when I add 'IsVisibleInPkb' and/or 'ValidationStatus' to the field list, I get an error returned from Salesforce.
 
The "fields" query string parameter contained object api names that do not correspond to the api names of any of the requested record ids. The requested object api names were: [Knowledge__c], while the requested records had object types: [Knowledge__kav]

Knowlege__c is a non-existent (or at the very least hidden) object. Also, both of these fields are standard fields on Knowledge__kav. Anyone else run in to anything like this?
I am attempting to set up a set of checkboxes where, if the parent checkbox is checked, then all children checkboxes will also be checked. Conversely, if ALL child checkboxes are checked, the parent checkbox will become checked. 

I have the first part of this logic working correctly. However, in working on the 2nd part of this, I am able to get the value to update in the parent component AND the component rerenders with the new value (according to the renderedCallback()). However, the parent checkbox remains unchanged. Is anyone able to help me understand why this is?

webcomponents.dev (https://webcomponents.dev/edit/neoeIsj0YVTR22F7qOYv/src/area.js)
When attempting to populate the value of a User lookup field via the 'value' attribute, I receive the following error:
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?