A method on the "Label" system class is not recognised as a valid symbol
- The Label class supports a “get” method which allows one to get a translated value (or default value) for a label.
- IC is doesn’t not detect this as a valid symbol and does not provide code completion or inline help etc.
Comments (8)
-
reporter -
repo owner The
Label
method is not present because it’s newly-introduced in Summer '23. It will be included in the IC2 build that accommodates changes for that release, and in fact has already been implemented locally:
Regarding the
Network.*
behavior, oddly I’m not even seeingNetwork
in theSchema
OST namespace folder. I’ll check why it’s not there…either it’s not being reported by the Salesforce API or IC2 is deciding not to include it, perhaps incorrectly seeing it as a duplicate ofSystem.Network
. -
reporter Thanks for the update. Let me know regarding Network…..
-
repo owner I was being silly. The org must have the
Communities
feature and Digital Experiences (previously “Communities”) enabled. ThenNetwork
is properly available as an SObject type.Your example does raise an interesting bug, though. IC2 sees the following as incorrectly invalid:
Network.Description.getDescribe().getLocalName();
but the following as fine:
Network.fields.Description.getDescribe().getLocalName();
That’s easy enough to fix, though, and I’ll take care of it for one of the upcoming builds.
UPDATE: Already fixed. IC2 has an existing special case provision for SObject type names that are also found in the implicit
System
namespace, e.g.,BusinessHours
,Location
, andSite
. I just needed to addNetwork
to that special case list so that these types of resolutions happen properly for unqualified references to those names in compile-time SObject type/field constants. -
reporter Awesome, thanks
-
repo owner The
Network
SObject type fix has been delivered in 2.2.7.0. -
repo owner - changed status to duplicate
Duplicate of
#2358. -
repo owner Merging into the Summer '23 update placeholder issue since the other aspects have been delivered and the remaining portions are part of that update.
- Log in to comment
I also noticed the following is also considered invalid (basically the symbols on Network aren’t coming up like an SObject)