Skip to main content

Timeline for Check lookup field is null in apex

Current License: CC BY-SA 3.0

12 events
when toggle format what by license comment
Apr 13, 2017 at 12:54 history edited CommunityBot
replaced http://salesforce.stackexchange.com/ with https://salesforce.stackexchange.com/
Feb 21, 2016 at 17:00 vote accept Prajith
Feb 19, 2016 at 14:56 answer added Adrian Larson timeline score: 9
Feb 19, 2016 at 14:50 history edited Adrian Larson CC BY-SA 3.0
deleted 36 characters in body
Feb 19, 2016 at 11:27 answer added Tushar Sharma timeline score: 0
Feb 19, 2016 at 11:18 comment added tandonprateek Thanks @Stygon. I think with ID variable also it should work fine as I said it checks for null as well. Lemme know if I have understood ur problem correctly.
Feb 19, 2016 at 11:16 comment added Prajith Thanks everyone. @tandonprateek It seems ideal, a minor concern is that - isnt that method optimised to be working with strings, will we be facing an issue due to using it on an ID variable.
Feb 19, 2016 at 11:14 comment added tandonprateek I always prefer to use String.isBlank(rec.lookupField__c). Reason being as isBlank method checks for both blank and null values.
Feb 19, 2016 at 11:13 comment added Ratan Paul Yeah if it is a lookup field then use null if it is a text field then use string.isblank.. But I prefer not to use lookupField__c == ''
Feb 19, 2016 at 11:12 answer added Jarvis timeline score: 1
Feb 19, 2016 at 11:09 comment added Keith C I always use the first approach.
Feb 19, 2016 at 11:04 history asked Prajith CC BY-SA 3.0