New answers tagged

0

You're not selecting Country in your subquery. Assuming it's present in the [Master DB] data extension: SELECT x.Email , x.Country , x.First_Name , x.Date_of_Birth , x.Age , CASE WHEN x.Country IN ('US', 'CA') THEN 'NA' WHEN x.Country IN ('DE', 'FR', 'GB', 'DK', 'FI', 'SE', 'AT', 'PL', 'PT', 'NO', 'NL', 'IE', 'BE') THEN 'EU' ELSE '...


2

In these situations, it helps to know which fields you do have access to. The SOAP API documentation is where I tend to turn to. In the SOAP API docs for LoginHistory, we see that there is a UserId field, which is a reference to User. User does contain ProfileId, which is what you're after. So your query's WHERE clause would look something like WHERE User....


2

Wrap your conditions in parenthesis to define the order { "operation": "query", "query": "SELECT Id, Name FROM Account where (name like 'Microsoft%' OR name like 'kumar%') and Id >= '001000000000000'" }


0

You forgot to insert the records you were creating: ALN_Integration__c[] alnIntegrationRecords = new ALN_Integration__c[0]; for (ALN_Integration__c recAln : lstCon) { AccountContactRelation acr = new AccountContactRelation(); acr.AccountId = accPmcMap.get(recAln.Property__c).Id; acr.ContactId = conMap.(recAln.First_Name__c + recAln.Last_name__c + ...


0

I'm not sure why you create Set as you can just write. List<ContentDocumentLink> cdlList = [SELECT Id, LinkedEntityId, ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId = :recordId]; But to answer your question, some Objects require explicit specification of Ids, so you need to specify them, you can do it via dynamic SOQL. List<...


0

Please change your WHERE clause for ContentDocumentLink as following WHERE LinkedEntityId = :recordIds instead of WHERE LinkedEntityId IN:recordIds Also, check if your recordId is not blank.


0

Here's how you can achieve the results in one query List<Rule__c> results = new List<Rule__c>(); results = [Select Id, Name, (Select Id, Name FROM Rule_Sets__r ) FROM Rule__c WHERE Id IN (Select Rule__c From Field__c)]; system.debug('>> ' + results); Please add fields as well as WHERE clauses wherever applicable ...


0

Instead of querying on Field__c object, query on Rule__c object. SOQL query for your requirement can be something like this: SELECT Field__c, Field__r.Name, Id, Name, <Place any additional fields here>, (SELECT Id, <Place the fields here> FROM Rule_Set__r) FROM Rule__c. You may also include a where clause on the above query, if need (as shown ...


0

Going from your reply, you only need records for a certain day. You could add the following WHERE-clause to your SQL query without the need to convert your date field: WHERE Date(DataEmitere) = DATE(today()) For performance reasons, I would not recommend to convert your date field to text if you want to filter on it.


Top 50 recent answers are included