0

I'm writing a code where I've 2 wire methods (both of type getRecord) and both of them are independent. Below is my code.

 @wire(getRecord, {
        recordId: "$configId",
        fields: CONFIG_FIELDS
    }) configDetails({
        error,
        data
    }) {
        if (data) {
          
            console.log(JSON.stringify(this.data));
        } else if (error) {
            console.log(JSON.stringify(error));
        }
    };
   

    @wire(getRecord, {
        recordId: "$recordId",
        fields: ["Name"]
    }) parentData({
        error,
        data
    }) {
        if (data) {
           console.log('Parent Field');
            console.log(JSON.stringify(data));
        } else if (error) {
            console.log('error');
        }
    };

In my case, only the first wire is working but not the second one. There is no error, nothing is getting logged.

Please let me know where I'm going wrong and how to fix it.

2
  • 1
    Please add the detail of how recordId and configId are defined and set by editing the question. – Phil W Nov 4 '20 at 21:02
  • If the provisioned property is undefined does not get called. – Rahul Gawale Nov 5 '20 at 6:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.