• Jalagam Kumar
  • NEWBIE
  • 29 Points
  • Member since 2022

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
in VFP inputtext is empty , then i want to disable the send button .
if inputfield is entered then only user can able to click teh send button
in VFP inputtext is empty , then i want to disable the send button .
if inputfield is entered then only user can able to click teh send button
    var OPTION1 =  this.template.querySelector("lightning-datatable[data-myid=dt6]").getSelectedRows();

    var OPTION2  = JSON.stringify(OPTION1);

Calling Apex Method:        
       
callNext({
        stringList : OPTION1 or OPTION2
        })  



    *********************************************
    ***ERROR MESSAGE I AM GETTING********
    *********************************************
        
    "message":"Value provided is invalid for action parameter 'stringList ' of type 'LIST'"

I’m using @wire to get the getMenuStructure  from es_get_Menu_Items,
When I call es_get_Menu_Items. getMenuStructure(  'a0u0C000009cXeIQAU')
from a debug window it returns a list
When I call it from an aura component I get data,
its the wire that’s not working, rather than the apex code
when I run the below it returns undefined.
Can you see what I am doing wrong ?

/*JS*/
import { LightningElement, api, wire, track } from 'lwc';
import getMenuStructure from '@salesforce/apex/es_get_Menu_Items.getMenuStructure';


export default class ChildComponent extends LightningElement {
    @api authStatuses;
    @api error;

    @wire(getMenuStructure  , {questionsetUserId: 'a0u0C000009cXeIQAU'})

    getMenuStructure({data,error}){
        alert('success ' + data);  
        if (data) {
            this.menuStructure = data;
            this.error = undefined;

        } else if (error) {
            this.error = error;
            this.menuStructure= undefined;
        }
    };        
}
    
 

List<Account> lstAccrecords = new list<Account>();
for (integer counter = 1; counter <= 200; counter++)
{
    Account Acc = new Account();
    
        Acc.name = 'Testing for bulkification';
        Acc.AnnualRevenue = '2000'+counter;
        Acc.BillingAddress = 'Delhi';
        Acc.Phone= '898231851'+counter;
    
}
if(!lstAccrecords.isempty())
{
    insert lstAccrecords;
}