API version of my new Apex code

18 views
Skip to first unread message

Chris Baker

unread,
Apr 2, 2025, 2:55:57 PMApr 2
to Illuminated Cloud General Discussion
Hi all, 

When I create a new Apex Class in my sandbox, the version of the class is 49. Is there a setting somewhere to determine the version of new classes and triggers, etc?
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>49.0</apiVersion>
<status>Active</status>
</ApexClass>

Chris Baker

unread,
Apr 2, 2025, 2:56:48 PMApr 2
to Illuminated Cloud General Discussion, Chris Baker
I updated the version of the SF CLI thinking that might help but that did not make a difference

Scott Wells

unread,
Apr 2, 2025, 2:59:00 PMApr 2
to Illuminated Cloud General Discussion, tchri...@gmail.com

Hi. The API version used when creating new meta.xml files is derived from the project’s associated connection. Make sure that’s set to the API version you want. Let me know if that doesn’t help.

Regards,
Scott Wells

Chris Baker

unread,
Apr 2, 2025, 3:02:19 PMApr 2
to Illuminated Cloud General Discussion, sc...@illuminatedcloud.com, Chris Baker
Yes, that helps. I found the API version on the connection. Thanks Scott
Reply all
Reply to author
Forward
0 new messages