Timeline for removing duplicates from a database.query based off a single field within that record
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 6, 2022 at 19:34 | history | edited | Derek F | CC BY-SA 4.0 |
added 358 characters in body
|
May 6, 2022 at 19:30 | comment | added | Derek F |
@ensir my bad. For traversing the hierarchy we need to use getSObject(<relationship name>) with some typecasting, followed by .Id or .get('Id') (the latter would require more typecasting). All the more reason to just use the relationship field directly.
|
|
May 6, 2022 at 19:26 | comment | added | ensir | Seems like it should work but it gives me a fatal error "System.SObjectException: Invalid field Machine_Config__r.Id for Merchandise__c I'm guessing the issue is it's trying to traverse the relationship hierarchy. | |
May 6, 2022 at 18:56 | history | answered | Derek F | CC BY-SA 4.0 |