
Tag: SOQL
soql – How to retrieve reportFolder.meta-xml files with the Access Type and ParentId attributes?
In your package.xml you have to include report folder name and report name as follow: <?xml version=”1.0″ encoding=”UTF-8″?> <Package xmlns=”http://soap.sforce.com/2006/04/metadata”> <types> <members>MyFolder</members> <members>MyFolder/Report1</members> <members>MyFolder/Report2</members> <name>Report</name> </types> </Package> Please note <members>MyFolder</members>,…
soql malformed in REST API on where clause for useremail
while running this code in anonymous window getting the error below String useremailaddress=”test@test.com“; HttpRequest req = new HttpRequest(); String query=’SELECT+id+,+uuid__c+from+User+WHERE+Username=”+useremailaddress; req.setEndpoint(“callout:salesforceauthnam/services/data/v56.0/query?q=’+query); req.setMethod(‘GET’); Http http = new Http(); HTTPResponse resp =…
SOQL Query for ContentDocument – Salesforce Stack Exchange
I ran this query below select id, owner.name, ownerid, title from contentdocument where id = ‘0695i000007L0FIAA0’ I got this results which shows me the owner id I then ran another…
SOQL Group by IN Salesforce
String query = ‘SELECT id,CreatedById,Product.Id,POCGrades__c ,fm_pocname__c,product.Name ,Visit.placeId, fm_poccode__c, createdby.LastName,Visit.LastModifiedDate, createddate, ActualBooleanValue’ + ‘ FROM retailvisitkpi’ + ‘ WHERE createddate = last_month and ‘ + ‘ ( Product.Id = \’01t5j000003tszWAAQ\” +…
soql – Can anyone write this code in optimized way?
I know it’s not the correct way to write the code like this. But can anyone help me to optimize this code without for loop? String userName=”test@test.com%”; List<String> objectNames =…