function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sowjisowji 

Query data w.r.t the standard field

Hi,

 

I have a doubt, So if want to query data w.r.t the standard  field of a custom object, how should I refer to it,

i.e using field label or name

 field label is BookingID 

field name is Name

select  No_of_Days__c from Rental_detail__c where BookingID=:30

or

select  No_of_Days__c from Rental_detail__c where Name=:30

 

 

Thanks,

Sowjanya

Best Answer chosen by Admin (Salesforce Developers) 
Ankit AroraAnkit Arora

You need to refer "Field Name" i.e in this case you can do like this :

 

List<Rental_detail__c> accLst = [select  No_of_Days__c from Rental_detail__c where Name='30'] ;

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page