• Sfdc_Spider
  • NEWBIE
  • 40 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 6
    Replies
I am trying to deploy the components to production org through VS code. I am getting the below error.

"sf:INVALID_OPERATION: INVALID_OPERATION: testLevel of NoTestRun cannot be used in production organizations"

Where can I edit the setting testLevel ? And I am not trying to deploy any apex class either.
I am trying to create a wrapper class to hold the JSON response in my apex class. But I am getting the error ' Inner types are not allowed to have inner types '. Below is my wrapper class.
 
public class GetTheDetails {

// Wrapper class

public class fromJSON{
    public String spreadsheetId;    
    public List<valueRanges> valueRanges ;
    public class valueRanges {
        public String range;    
        public String majorDimension;   
        public List<values> values;
    }
    public class values {
        public String Id;           //Id
        public String AccountID;    //AccountId
        public String CreatedById;  //CreatedById
        public String Name;         //Name
        public String StageName;    //StageName
        public String CloseDate;    //CloseDate
    }
    public fromJSON parse(String json){
        return (fromJSON) System.JSON.deserialize(json, fromJSON.class);
    }
    
} }

Can anybody help me in identifying the error ? I am not able to find any syntax error in defining wrapper class here.
There are 3 objects Books__c, Reader__c, Borrowed_by__c.

There is a master-detail field on Borrowed_by__c with Books__c. There is a lookup relationshp field on Borrowed_by__c with Reader__c

I am trying to retrieve the field of these objects in single query. I am using the below queries.

This query is giving results.
 
select id, name, reader__r.name, from Borrowed_by__c


These below query are not giving results.
 
select id, name, reader__r.name, books__r.name from Borrowed_by__c 

select id, books__r.name from Borrowed_by__c 

select id, (select id, name from books__r) from Borrowed_by__c


The child relationship names are correct.
What should I modify in my query to get the fields of both Books__c and Borrowed_by__c or peferably 3 related objects ?
What could be the problem in below code. I am getting the error "Variable does not exist : Account"

        List<Opportunity> opp = [Select o.Id, o.AccountId, o.Account.Description from opportunity o where Id IN :optymap.keySet()] ; 
        
        for(List<Opportunity> oppfor : opp){
            
            If(oppfor.Account.Description = 'ABC'){
                
            }
            
Hello,
I have a class and a method. In the method I am calling another method of another class - Class2.Method2
The return type of method 2 is a wrapper class. What should be the variable type in my method 1 to hold this returning wrapper class from the method 2 ?

Wrapper class is like below

   public class wrapperClass1{
   Integer sampleint{get; set;}
   String samplestr{get; set;}
   Account acc{get; set;}

I am getting the error as "Illegal Assignment".
When using LWC lightning-datatable that has a horizontal scrollbar, during inline-edit, the horizontal scrollbar disappears.
Upon inspecting the component, it doesn't actually disappeaer but is hidden because of the Save/Cancel overlay.
Does anyone know how to display the horizontal scrollbar properly during inline-edit?

LWC lightning-datatable with horizontal scrollbar
User-added image

During inline edit. Notice horizontal scrollbar is not visible
User-added image
I am trying to deploy the components to production org through VS code. I am getting the below error.

"sf:INVALID_OPERATION: INVALID_OPERATION: testLevel of NoTestRun cannot be used in production organizations"

Where can I edit the setting testLevel ? And I am not trying to deploy any apex class either.
What could be the problem in below code. I am getting the error "Variable does not exist : Account"

        List<Opportunity> opp = [Select o.Id, o.AccountId, o.Account.Description from opportunity o where Id IN :optymap.keySet()] ; 
        
        for(List<Opportunity> oppfor : opp){
            
            If(oppfor.Account.Description = 'ABC'){
                
            }
            
Hello,
I have a class and a method. In the method I am calling another method of another class - Class2.Method2
The return type of method 2 is a wrapper class. What should be the variable type in my method 1 to hold this returning wrapper class from the method 2 ?

Wrapper class is like below

   public class wrapperClass1{
   Integer sampleint{get; set;}
   String samplestr{get; set;}
   Account acc{get; set;}

I am getting the error as "Illegal Assignment".