0

I need to update lightning API version to 40 or more for Open CTI components as it is the requirement of security review. Currently, I have version 38.0. I wanted to know how can I update API version.

Can we follow the approach of updating it via apex query?

Something as this:

List<AuraDefinitionBundle> obj = [SELECT Id, DeveloperName, ApiVersion, Description FROM AuraDefinitionBundle WHERE DeveloperName = 'demoAdapterOut'];

obj[0].ApiVersion = 40.0;
Update obj;

For testing when I executed this query, I got error DML operation Update not allowed on List<AuraDefinitionBundle>

Kindly suggest a solution.

2
  • You'll need to use Metadata API in order to perform this update Commented Mar 4, 2021 at 8:52
  • @OleksandrBerehovskyi Can you please provide some sample for that?
    – Badar
    Commented Mar 4, 2021 at 8:55

1 Answer 1

0

This worked for me:

Go to Developer Console, open component. On the right side, click Bundle Version Settings. Set the version you want from dropdown list, click Save.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .