Schema.RecordTypeInfo unrecognized method isActive()

Issue #1027 resolved
Jay Hardin created an issue

copy this into anonymous execution window and submit and you get a successful execution. However, after generating a full symbol offline table this throws an error in my IntelliJ IDE.
Reason: because the compiler does not recognize the isActive() method.

Map<String, Schema.RecordTypeInfo> rt_infos = Schema.SObjectType.Lead.getRecordTypeInfosByName();

for (String key: rt_infos.keySet()) { System.debug('key:'+key+','+rt_infos.get(key).isActive()); }

I checked the Symbol Table for the Schema.RecordTypeInfo and it does have the method there! shown below // Generated by Illuminated Cloud on Mon Jun 11 16:52:09 EDT 2018. Do not edit.

global class /Schema./RecordTypeInfo { global Boolean active; global Boolean available; global Boolean defaultRecordTypeMapping; global Boolean master; global String name; global Id recordTypeId;

global String getName()
{
}

global Id getRecordTypeId()
{
}

global Boolean isActive()
{
}

global Boolean isAvailable()
{
}

global Boolean isDefaultRecordTypeMapping()
{
}

global Boolean isMaster()
{
}

}

but for some reason, even though the method shows up in the auto-complete, the compiler isn't recognizing it.

I hope this is a simple fix, or that just I have something configured wrong. Also, the Illuminated Cloud version I have is 1.8.3.2 which isn't an option in the drop down :(

Comments (6)

  1. Scott Wells repo owner

    Jay, I apologize but I'm either misunderstanding the issue or perhaps it's been resolved by the Summer '18 updates. I paste the two lined you've provided into the Anonymous Apex tool window and there are no errors, then I execute that script and there are no errors. Note that I did regenerate my OST immediately before trying this, so perhaps that's related? Or was this added as part of API 43.0 and you're still configured to use an earlier API version?

    Also, I've updated the available versions to be current. I guess I forgot to add the latest ones after the most recent update.

    Please let me know if you are able to reproduce this issue now.

  2. Scott Wells repo owner

    I'm resolving this as unable to reproduce for now, but don't hesitate to reopen if you can reproduce it along with answers to the most recent questions and any new relevant info. Thanks!

  3. Jay Hardin reporter

    Hi Scott, thanks for looking into this!! I was assuming I had v43.0 I've checked the package.xml file and it does show 43.0

  4. Scott Wells repo owner

    Jay, you may also need to adjust the meta.xml file for the Apex class that's calling this API. Once you get things updated to API 41.0 or higher properly, it should be accepted by the server.

  5. Log in to comment