Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //convert a Set<String> into a quoted, comma separated String literal for inclusion in a dynamic SOQL Query
- private static String quoteKeySet(Set<String> mapKeySet)
- {
- String newSetStr = '' ;
- for(String str : mapKeySet)
- newSetStr += '\'' + str + '\',';
- newSetStr = newSetStr.lastIndexOf(',') > 0 ? '(' + newSetStr.substring(0,newSetStr.lastIndexOf(',')) + ')' : newSetStr ;
- System.debug('quoteKeySet() : newSetStr ============ ' + newSetStr);
- return newSetStr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement