The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

3

Sorry to bring this up... but it is a no go with LIKE. You probably need to get some other logic: From the documentation: Expression is true if the value in the specified fieldName matches the characters of the text string in the specified value. The LIKE operator in SOQL and SOSL is similar to the LIKE operator in SQL; it provides a mechanism for ...


3

You need to use SObject as the value, not Object. Map<Id, SObject> opportunities = new Map<Id, SObject>(Database.query(...));


2

@CommonCoreTawan is correct. I don't understand why you need to do this without using the "borrower__c" or "borrower__r field". Considering you want to only use the opportunity Id and NOT Borrower__r. You could use a nested query such as the following which uses the Opp Id as you requested. Id oppId = '0061I00000gdjafRQR'; List<Account> liAccount =...


2

Clarification provided by Vladimir Gerasimov about the current Winter '20 Beta functionality: Apologies for the confusion. Since Dependency API is currently in beta, it's only available in sandboxes. I think they way it's documented in our release notes is a bit confusing as it says: Where: This change applies to Lightning Experience, Salesforce ...


1

You can use SOQL Tooling api - can test from developer console: Also in older orgs you have objects ExternalString and ExternalStringLocalization which will give info on custom labels and also translated labels.


1

Your type returned from a query is always defined by your FROM clause. You can sometimes assign to a singular object instead of a list when you know there is exactly one result. But the type would be the same. No other clause in your query matters. Only FROM. Please note that the syntax for querying a parent field involves using the relationship name. For ...


1

Your problem is here: set<string> conid = new set<string>(); if(conid.size()>0 && conid !=null){ // this will always be false!! for (Contact c : con){ conid.add(c.id); } } you want: set<Id> conid = new set<Id>(); for (Contact c: con) { conId.add(c.Id); } You can actually rewrite this whole class ...


1

You can query the account fields in two ways SELECT borrower__r.Name,borrower__r.Industry FROM Opportunity WHERE Id = 'myid' or and query the object directly filtering by the account id on the opportunity SELECT Name,Industry FROM Account WHERE Id = :opportunityRecord.Borrower__c


Only top voted, non community-wiki answers of a minimum length are eligible