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
Devadarsi Devasis 2Devadarsi Devasis 2 

Can anyone tell me the data type of the field Brand__c by looking into this query?

productList = new map<Id,Product2>([select Id,ProductCode,Name,Brand__c,Stock_Quantity__c 
 from Product2 where Brand__c LIKE :'%'+searchValue+'%' AND Stock_Quantity__c>0]);
ShirishaShirisha (Salesforce Developers) 
Hi Devadarshi,

Greetings!

It could be the Text type as the LIKE operator used for matching partial text strings and includes support for wildcards.

Reference:https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_where.htm

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri