tag:blogger.com,1999:blog-6140199022860280334.post8610548166561749306..comments2024-03-28T13:07:29.449+00:00Comments on Bob Buzzard Blog: Apex Ternary Operator and TypesBob Buzzardhttp://www.blogger.com/profile/07815472992351343395noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-6140199022860280334.post-77690231397223585772020-12-29T21:06:35.723+00:002020-12-29T21:06:35.723+00:00Alternatively, you could have:
byId? (String)...Alternatively, you could have:<br /><br /> byId? (String)acc.Id:acc.Name;<br /><br />By casting to a String, you'd avoid the conflict, as both operands would now be strings. Of course, the solution here is perfectly valid. I just thought it'd be nice for people to have an alternative.Brian Fearhttps://www.blogger.com/profile/12042310593613999985noreply@blogger.comtag:blogger.com,1999:blog-6140199022860280334.post-79582399823151795492014-11-05T17:26:41.276+00:002014-11-05T17:26:41.276+00:00Nice Post !!!Nice Post !!!Anonymoushttps://www.blogger.com/profile/01555103781203060570noreply@blogger.comtag:blogger.com,1999:blog-6140199022860280334.post-28662607483292881952014-11-04T18:54:40.864+00:002014-11-04T18:54:40.864+00:00Fixed - thanks for letting me know!Fixed - thanks for letting me know!Bob Buzzardhttps://www.blogger.com/profile/07815472992351343395noreply@blogger.comtag:blogger.com,1999:blog-6140199022860280334.post-3064174140002699872014-11-04T18:39:41.878+00:002014-11-04T18:39:41.878+00:00Hi Bob,
Great post! There is a typo in the second...Hi Bob,<br /><br />Great post! There is a typo in the second code snippet.<br /><br />return buildOptions(accs, false); -> should be (accs, true) for getOptionsById.Deepamhttps://www.blogger.com/profile/12092033092852361961noreply@blogger.com