Skip to main content
13 events
when toggle format what by license comment
Jun 12, 2017 at 8:04 comment added Keith C @AlexanderBerehovskiy Your original answer (using the bind variable) was perfect because that avoids the SOQL injection risk. I was originally just asking you to point that out in your answer i.e. you answer fixed the immediate problem and also avoided the injection problem.
Jun 12, 2017 at 7:42 history edited Oleksandr Berehovskyi CC BY-SA 3.0
added 38 characters in body
Jun 12, 2017 at 7:40 comment added Oleksandr Berehovskyi @KeithC Didn't understand you properly. I've updated my answer one more time
Jun 12, 2017 at 7:34 history edited Oleksandr Berehovskyi CC BY-SA 3.0
added 224 characters in body
Jun 12, 2017 at 7:25 comment added Keith C @AlexanderBerehovskiy Sorry I wasn't clear: using either :city or String.escapeSingleQuotes(city) avoids the injection problem, with the former (that you had used) being cleaner. Was just asking for a mention of the risk as it is important to keep in mind with dynamic SOQL.
Jun 12, 2017 at 6:53 history edited Oleksandr Berehovskyi CC BY-SA 3.0
added 34 characters in body
Jun 12, 2017 at 6:47 history edited Oleksandr Berehovskyi CC BY-SA 3.0
added 34 characters in body
Jun 11, 2017 at 10:03 comment added Keith C +1 from me. Can you add a point to your answer about how it also avoids the SOQL injection risk?
Jun 10, 2017 at 19:44 comment added Oleksandr Berehovskyi accept it if it helps you, so other users with same problem would have an answer
Jun 10, 2017 at 18:04 comment added Oleksandr Berehovskyi @bingi I've updated my post above with dynamic query
Jun 10, 2017 at 18:03 history edited Oleksandr Berehovskyi CC BY-SA 3.0
edited body
Jun 10, 2017 at 17:55 comment added bingi i need only dynamic i have requirement do another scenario
Jun 10, 2017 at 17:53 history answered Oleksandr Berehovskyi CC BY-SA 3.0