• Hema Yejju
  • NEWBIE
  • 10 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 8
    Replies
 <lightning-combobox
            name="Loc picklist"
            label="Location"
            value={selectedLoc}
            options={objects}
            onchange={handleChange}
            dropdown-alignment="auto"
          >
          </lightning-combobox>


 <lightning-combobox
         name="Unit"
         label="Sales Unit"
         value={selectedUnit}
         options={suObjects}
         onchange={handleChange}
         dropdown-alignment="auto"
        >
        </lightning-combobox>
__________________________________________________


handleChange(event) {
        console.log("value :" + event.detail.value);

        let fieldname = event.target.name;
      
        console.log('fieldname ::here'+fieldname);
        var pickListValue = event.detail.value;
        
        
        if(fieldname=='Loc picklist'){
        
        
        if(pickListValue!=null){

          
          var selloc =pickListValue;
         
          this.selectedLoc=selloc; 
         console.log('allData in handle change'+this.allData); 

        
          const uniqueSet = new Set();
          let obj1 = [];
          
          for(let i=0; i<this.allData.length; i++){

           
            if(this.allData[i].location==selloc && this.allData[i].sUnit){

                console.log(JSON.stringify( this.allData[i].sUnit));
                if(!uniqueSet.has(this.allData[i].sUnit)){
                    console.log(JSON.stringify( this.allData[i].sUnit));
                    const option = {
               
                        label: this.allData[i].sUnit, 
                        value: this.allData[i].sUnit  
                    };

                    obj1.push(option);
                    
                } 
                uniqueSet.add(this.allData[i].sUnit); 
            
            }
           
          }
          this.suObjects = obj1;

         

        }
    } 


I have 3 combobox where in if i select 1st combobox picklist value then 2 picklist  combobox value will appear  and then 3rd..

Now if  i change 1st combox picklist value then 2nd and 3rd picklist values which are previously selected should be black .

plz suggest me here 
@AuraEnabled(cacheable=true)
     public static Map<Id,String>   getCaseextCd(Id recordId){
      List<Case>  csext = new List<Case>();
     List<object__c> csExList=new List<object__c>();
     Map<Id,String> caseIdCommentforsales=new Map<Id,String>(); 

  
    csext=[Select Id, (SELECT Case__c, Comment_for_Sales__c,Approver__c FROM object__r FROM Case WHERE Id=:recordId];

          System.debug('csext :::'+csext);

        for(Case c:csext){

                if(!c.object__r.isEmpty()){
                    csExList.add(c.object__r); 
                } 
                
            }
       for (object__c csEx:csExList){
        caseIdCommentforsales.put(csEx.Case__c,csEx.Comment_for_Sales__c ); 
    
        system.debug('caseIdCommentforsales'+caseIdCommentforsales);

            }
            
            return caseIdCommentforsales;
     }


LWC:

 @wire(getCaseextCd, { recordId: '$recordId', fields: [NAME_FIELD1] })
    cons(result) {
        this.caseCommentr = result;
        if (result.error) {
            this.caseCommentr = undefined;
        }
    };

_______________________________________________

My LWC was incorrect and i am unable to write the lwc how to display the field on Click of the quick action button and how to stroe the input given for the field on the record for the particualr Objetc.field 
Hi , i am trying to populate one field value from my Case object where in i want to dispaly the particular field on the Quick action button of case record page.
   </lightning-quick-action-panel>
 <!  <lightning-record-edit-form
         object-api-name={objectApiName}
         record-id={recordid}
         onsuccess={handleSuccess}>
         <lightning-input-field field-name={nameField} ></lightning-input-field>
       
        </lightning-record-edit-form>


JS:
/*  handleSuccess(event){
        // Close the modal window and display a success toast
       
        this.dispatchEvent(
            new ShowToastEvent({
                title: 'Success',
                message: 'Record updated!',
                variant: 'success'
            })
        );
   }*/


i am getting nothing while im clicking on that button if i use this
I am trying to craete a button with name 'salesTeam', on case record page.

On click of 'Salesteam' button i must be able to select the users howhom i need to send the case with the help of Field on User Object.

In user object i have one field called unit:
if User.unit=='New' || user.unit=='Inprogress || User,.unit='Rejected'

on button click i should be able to see those users to select and assign case to them.

parallelly caseOwner was one of the field on Case object ,even that should change to specific user on button click after selecting what user the record needs to be shared with.

can some one help me her
How to find the Fields in Particular case object which belongs to the data Type of the field 'Date'
HI , I have a custom Platform Event craeted and i am facing one issue like, when i run the script using the platform event in workbench i am getting error Line-1 clumn -1.

i am stuck in what permission needs to be given to the particualr user (profile) who are running the script from workbench.
<aura:component controller="Approval"
                implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
                
                 <lightning:button variant="brand" label="Yes" class="slds-align_absolute-center"
                            title="Amount" onclick="{!c.sendEmailtouser}"
                              />
                            
                            
                            sendEmailtouser : function(component,event,helper) {
   component.find("YesBtn").set("v.disablebutton", true);
     if (state === "SUCCESS") {
         
             component.set('v.showButton',false); 
     }
 

I have the below code for Sales Object..there is a field called 'Dis type' on sales object and api name is 'Dis_Type__c'

in the Sales record page if user selects  Dis type as ' CallBck' the status of the record should be in working and in the same record 
owner id should be assigned to Queue...Where owner id is Lookup(user,Group);

 if(cs.Dis_Type__c == 'Callbck' ){
                   system.debug('cs.Disposition ' +cs.Disposition_Type__c);
                   List<Group> abcQueue = [select Id,Name from Group where Type = 'Queue'];
                   for(Group que : abcQueue){
                           if(que.Name == 'Sales Queue'){
                               cs.OwnerId = que.Id;
                               
                           }
                      }
                 
                 }
                 
                Can any one help me to write test method for this ?
im trying to authorize my org ..but i am getting this error 

when i run the below command:
 sfdx plugins:install @salesforce/lwc-dev-server
Error:
Try running: `sudo npm install -g node-gyp`
spawn node-gyp.cmd ENOENT
'nodejs' is not recognized as an internal or external command,
operable program or batch file.
Installing plugin @salesforce/lwc-dev-server... failed
    Error: yarn add @salesforce/lwc-dev-server@latest --non-interactive --mutex=file:C:\Users\hema_yejju\AppData\Local\sfdx\yarn.lock
    --preferred-cache-folder=C:\Users\hema_yejju\AppData\Local\sfdx\yarn --check-files exited with code 1
_____________________________________________________
When i run this command:npm install -g node-gyp
Error:
 Unsupported engine {
npm WARN EBADENGINE   package: 'npmlog@6.0.0',
npm WARN EBADENGINE   required: { node: '^12.13.0 || ^14.15.0 || >=16' },
npm WARN EBADENGINE   current: { node: 'v15.5.1', npm: '7.3.0' }
npm WARN EBADENGINE }
______________________________________________________
when i run this command: sfdx plugins:install @salesforce/lwc-dev-server
Error:
Try running: `sudo npm install -g node-gyp`
spawn node-gyp.cmd ENOENT
'nodejs' is not recognized as an internal or external command,
operable program or batch file.
Installing plugin @salesforce/lwc-dev-server... failed
    Error: yarn add @salesforce/lwc-dev-server@latest --non-interactive --mutex=file:C:\Users\hema_yejju\AppData\Local\sfdx\yarn.lock
    --preferred-cache-folder=C:\Users\hema_yejju\AppData\Local\sfdx\yarn --check-files exited with code 1
PS C:\Users\hema_yejju>
________________________________________
In my environment variables : i have the below 2 paths set:
C:\Program Files\Salesforce CLI\bin

C:\Program Files\nodejs\node_modules\npm\bin
Hi, I have a lightning aura component and i am using one button in .cmp

 <aura:attribute name="showthisButton" type="boolean" default="false"/>
 <aura:attribute name="state" type="String" />
<aura:attribute name="response" type= "String" />
<lightning:button variant="brand" label="Yes" class="slds-align_absolute-center"
                            title="Payment" onclick="{!c.sendEmailNow}"
                             />

In Controller:
 sendEmailNow: function(component, event, helper){
        helper.sendEmailNow(component, event, helper);

In Helper:

sendEmailNow : function(component,event,helper) {
      var accountId = component.get("v.accountId");
      console.log('in here----'+accountId);
      
      var action = component.get('c.getdetails');//apex class method
      action.setParams({ 'AccountId' : accountId });
      
      action.setCallback(this, function(response){  
          var state = response.getState();
          var error= response.getError();
          
           if (state === "SUCCESS") {
               
            component.set('v.showthisButton',false); 
        
          } else if (state === "INCOMPLETE") {
              
            
              alert ("Failed ");
          }else if (state === "ERROR") {
              var errors = response.getError();
              if (!errors) {
                  errors = [{"message" : "Unknown Error Occured"}];
              }
              alert ("Error occured"+errors);
          }
         
        
          
         
     });
      $A.enqueueAction(action); 
     
  }
Here in the below code ,I have 2 pick list fields(Customer_needs,need_Type__c )when i select need sub type as'Fund' or need subtype as Personal ...My account status field onthe record page  should be displayed as closed and thats working fine .
-->but the issue i'm facing here is i'm not getting account status as closed while im trying subtype as 'Sale' and Customer_needs == Null(selecting nothing in this field )

I dont know what went wrong here ..all label names and field names are crct..Please help me here...

if(he..Customer_needs == Null || cs.Customer_needs == ''){
if(he.need_Type__c == 'Connected'){
if(he.need_Sub_Type__c == 'Sale' || he.need_Sub_Type__c == 'Fund' || he.need_Sub_Type__c  == 'Personal'){
he.Status = GlobalConstants.STATUS_CLOSED;
system.debug('he.status = ' +he.Status);
}
}}
I have one query and when im trying to iterate over it was showing the error.
[SELECT AccountSource,Account_Status__pc,Address_Verification_Status__pc,Agency_Code__c,Agency_Display_Name__c ,(
                                    SELECT Applicant__c,Appraisal_Value__c,Area__c,Account__c FROM Case) FROM Account WHERE Id IN: caseIdList];

I have this query while im writing like this :

                for(Account cs:acclist){
                                    
                                    if(cs.Case__r.Area__c!=null){
                    
                    htmlBody += '<tr><td style="border:1px solid red">' + 'CaseNumber' + '</td><td  style="border:1px solid ">' + cs.CaseNumber + '</td></tr>';
                }
@AuraEnabled(cacheable=true)
     public static Map<Id,String>   getCaseextCd(Id recordId){
      List<Case>  csext = new List<Case>();
     List<object__c> csExList=new List<object__c>();
     Map<Id,String> caseIdCommentforsales=new Map<Id,String>(); 

  
    csext=[Select Id, (SELECT Case__c, Comment_for_Sales__c,Approver__c FROM object__r FROM Case WHERE Id=:recordId];

          System.debug('csext :::'+csext);

        for(Case c:csext){

                if(!c.object__r.isEmpty()){
                    csExList.add(c.object__r); 
                } 
                
            }
       for (object__c csEx:csExList){
        caseIdCommentforsales.put(csEx.Case__c,csEx.Comment_for_Sales__c ); 
    
        system.debug('caseIdCommentforsales'+caseIdCommentforsales);

            }
            
            return caseIdCommentforsales;
     }


LWC:

 @wire(getCaseextCd, { recordId: '$recordId', fields: [NAME_FIELD1] })
    cons(result) {
        this.caseCommentr = result;
        if (result.error) {
            this.caseCommentr = undefined;
        }
    };

_______________________________________________

My LWC was incorrect and i am unable to write the lwc how to display the field on Click of the quick action button and how to stroe the input given for the field on the record for the particualr Objetc.field 
Hi , i am trying to populate one field value from my Case object where in i want to dispaly the particular field on the Quick action button of case record page.
   </lightning-quick-action-panel>
 <!  <lightning-record-edit-form
         object-api-name={objectApiName}
         record-id={recordid}
         onsuccess={handleSuccess}>
         <lightning-input-field field-name={nameField} ></lightning-input-field>
       
        </lightning-record-edit-form>


JS:
/*  handleSuccess(event){
        // Close the modal window and display a success toast
       
        this.dispatchEvent(
            new ShowToastEvent({
                title: 'Success',
                message: 'Record updated!',
                variant: 'success'
            })
        );
   }*/


i am getting nothing while im clicking on that button if i use this
I am trying to craete a button with name 'salesTeam', on case record page.

On click of 'Salesteam' button i must be able to select the users howhom i need to send the case with the help of Field on User Object.

In user object i have one field called unit:
if User.unit=='New' || user.unit=='Inprogress || User,.unit='Rejected'

on button click i should be able to see those users to select and assign case to them.

parallelly caseOwner was one of the field on Case object ,even that should change to specific user on button click after selecting what user the record needs to be shared with.

can some one help me her
How to find the Fields in Particular case object which belongs to the data Type of the field 'Date'
HI , I have a custom Platform Event craeted and i am facing one issue like, when i run the script using the platform event in workbench i am getting error Line-1 clumn -1.

i am stuck in what permission needs to be given to the particualr user (profile) who are running the script from workbench.
Hi, I have a lightning aura component and i am using one button in .cmp

 <aura:attribute name="showthisButton" type="boolean" default="false"/>
 <aura:attribute name="state" type="String" />
<aura:attribute name="response" type= "String" />
<lightning:button variant="brand" label="Yes" class="slds-align_absolute-center"
                            title="Payment" onclick="{!c.sendEmailNow}"
                             />

In Controller:
 sendEmailNow: function(component, event, helper){
        helper.sendEmailNow(component, event, helper);

In Helper:

sendEmailNow : function(component,event,helper) {
      var accountId = component.get("v.accountId");
      console.log('in here----'+accountId);
      
      var action = component.get('c.getdetails');//apex class method
      action.setParams({ 'AccountId' : accountId });
      
      action.setCallback(this, function(response){  
          var state = response.getState();
          var error= response.getError();
          
           if (state === "SUCCESS") {
               
            component.set('v.showthisButton',false); 
        
          } else if (state === "INCOMPLETE") {
              
            
              alert ("Failed ");
          }else if (state === "ERROR") {
              var errors = response.getError();
              if (!errors) {
                  errors = [{"message" : "Unknown Error Occured"}];
              }
              alert ("Error occured"+errors);
          }
         
        
          
         
     });
      $A.enqueueAction(action); 
     
  }