• Chintha santosh
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 0
    Replies
How to integrate salesforce lightning application to an official website for external users? And
How to give the permissions to make visible to the customers?
 
Navigating component from another component..
On clicking the button i didn't get the target component..
component:

<aura:component implements="lightning:isUrlAddressable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome" access="global">
 <aura:attribute name="pageReference" type="Object"/>
    
   <lightning:navigation aura:id="navService"/>
    
    <lightning:button name="test" label="Navigate to Account list view" onclick="{!c.navigate}" />
    
 

</aura:component>


JS Controller:
({
    Navigate: function(component, event, helper) {
        
     var pageReference = component.find("navService");
        var pageReferenceNav = {
            "type" : "standard__component",
            "attributes" : {
                "componentName" : "c__LC_BookMyHome_3008"
            },
            "state" :{
                "myAttr" : "atrvalue"
            }
        };
        pageReference.navigate(pageReferenceNav);
    },
})
HI,
I'm getting this error like
System.QueryException: only aggregate expressions use field aliasing


public static list<Property__c> getFilteredProperty(string Location,string BedRoom,string BathRoom,string MaxBudget)
  {
  list<Property__c> allPropertyLists = new list<Property__c>();
  string PropertyQuery = 'SELECT Id,Additional_Rooms__c,Available_From__c,Carpet_area_sqft__c,Covered_Area_sqft__c ';
     PropertyQuery = PropertyQuery+ 'Electricity_Status__c,Facing__c,Floor__c,For_Bachelor__c,For_Family__c,Furnishing_Available__c,Furnish_Type__c,Geo_Map__c,Landmark__c,Location__c,Area__c,Status__c,State__c,country__c,Maintainance_Charge__c,No_of_Balcony__c,No_of_Bathroom__c,No_of_Bedroom__c,Property_Description__c,Property_Main_Image__c,Property_Owner__c,Property_Video_URL__c,Name,Rent__c,Security_Deposit__c,Verified__c,Water_Availability__c ';
     PropertyQuery = PropertyQuery+' FROM Property__c ';
  string WhereClause= 'WHERE Rent__c != NULL';
      system.debug('*****Location'+Location);
      if(string.isNotBlank(Location))
      {
          if(Location !='ALL')
          {
              WhereClause=WhereClause+ ' AND Area__c =:Location ';
          }
      }
      system.debug('*****BedRoom'+BedRoom);
      integer BedRoomCount;
      if(string.isNotBlank(BedRoom))
      {
          if(BedRoom !='ALL')
          {
              BedRoomCount=integer.valueOf(BedRoom);
              WhereClause=WhereClause+ ' AND No_of_Bedroom__c=:BedRoom ' ;
          }
      }
       system.debug('*****BathRoom'+BathRoom);
      integer BathRoomCount;
      if(string.isNotBlank(BathRoom))
      {
          if(BathRoom !='ALL')
          {
              BathRoomCount=integer.valueOf(BathRoom);
              WhereClause=WhereClause+ ' AND No_of_Bathroom__c=:BathRoom ' ;
          }
      }
      system.debug('*****MaxBudget'+MaxBudget);
      double MaxBudgetValue;
      if(string.isNotBlank(MaxBudget))
      {
              MaxBudgetValue=double.valueOf(MaxBudget);
              WhereClause=WhereClause+ ' AND Rent__c <=:MaxBudget ' ;
      }
      PropertyQuery=PropertyQuery+' '+WhereClause;
      system.debug('PropertyQuery' +PropertyQuery);
      allPropertyLists = Database.query(PropertyQuery);
       system.debug('PropertyQuery' +allPropertyLists);     
      return allPropertyLists;
   }public static list<Property__c> getFilteredProperty(string Location,string BedRoom,string BathRoom,string MaxBudget)
  {
  list<Property__c> allPropertyLists = new list<Property__c>();
  string PropertyQuery = 'SELECT Id,Additional_Rooms__c,Available_From__c,Carpet_area_sqft__c,Covered_Area_sqft__c ';
     PropertyQuery = PropertyQuery+ 'Electricity_Status__c,Facing__c,Floor__c,For_Bachelor__c,For_Family__c,Furnishing_Available__c,Furnish_Type__c,Geo_Map__c,Landmark__c,Location__c,Area__c,Status__c,State__c,country__c,Maintainance_Charge__c,No_of_Balcony__c,No_of_Bathroom__c,No_of_Bedroom__c,Property_Description__c,Property_Main_Image__c,Property_Owner__c,Property_Video_URL__c,Name,Rent__c,Security_Deposit__c,Verified__c,Water_Availability__c ';
     PropertyQuery = PropertyQuery+' FROM Property__c ';
  string WhereClause= 'WHERE Rent__c != NULL';
      system.debug('*****Location'+Location);
      if(string.isNotBlank(Location))
      {
          if(Location !='ALL')
          {
              WhereClause=WhereClause+ ' AND Area__c =:Location ';
          }
      }
      system.debug('*****BedRoom'+BedRoom);
      integer BedRoomCount;
      if(string.isNotBlank(BedRoom))
      {
          if(BedRoom !='ALL')
          {
              BedRoomCount=integer.valueOf(BedRoom);
              WhereClause=WhereClause+ ' AND No_of_Bedroom__c=:BedRoom ' ;
          }
      }
       system.debug('*****BathRoom'+BathRoom);
      integer BathRoomCount;
      if(string.isNotBlank(BathRoom))
      {
          if(BathRoom !='ALL')
          {
              BathRoomCount=integer.valueOf(BathRoom);
              WhereClause=WhereClause+ ' AND No_of_Bathroom__c=:BathRoom ' ;
          }
      }
      system.debug('*****MaxBudget'+MaxBudget);
      double MaxBudgetValue;
      if(string.isNotBlank(MaxBudget))
      {
              MaxBudgetValue=double.valueOf(MaxBudget);
              WhereClause=WhereClause+ ' AND Rent__c <=:MaxBudget ' ;
      }
      PropertyQuery=PropertyQuery+' '+WhereClause;
      system.debug('PropertyQuery' +PropertyQuery);
      allPropertyLists = Database.query(PropertyQuery);
       system.debug('PropertyQuery' +allPropertyLists);     
      return allPropertyLists;
   }