0

Please be gentle with me. I just barely started using Salesforce.

I hardly know where anything is. The person in my company that has been in charge of Salesforce is retiring soon and isn't showing me how to navigate this jumbo jet.

Please tell me where in Salesforce to find the option to edit the button that is generating this script error.

Please make your solution ridiculously simple. I'm really afraid I'm going to screw something up, really bad.


A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'sf:UNSUPPORTED_API_VERSION', faultstring:'UNSUPPORTED_API_VERSION: The API version that was specified (13.0) is below the minimum supported (21.0). Change the version number and run the request again.', detail:{UnexpectedErrorFault:{exceptionCode:'UNSUPPORTED_API_VERSION', exceptionMessage:'The API version that was specified (13.0) is below the minimum supported (21.0). Change the version number and run the request again.', }, }, }

1 Answer 1

1

This is incredibly simple, actually. First, you'll need to find the button, then change the code (it's virtually impossible to screw up).

Lightning

Click on the ⚙️, Object Manager, Cases, "Buttons, Links, and Actions", find the Close Case button, click the down-arrow menu on the right, choose Edit.

Classic

Click on Setup (in some configurations, found in the menu beneath your name in the top-right corner), Customize, Cases, "Buttons, Links, and Actions", and click Edit.

In your code, you should see something like:

{!REQUIRESCRIPT('/soap/ajax/13.0/connection.js')}

Simply change the 13 to 31, and you're set (for now).

Note that this problem was caused because all API versions 20 and lower have been permanently retired, and 21-30 will be permanently retired next year.

In the meantime, you may want to dedicate a bit of time to create a flow, component, Visualforce page button, or something else in order to retain this functionality after next year. The specific solution will depend on if this is a list button or page button, but you shouldn't put it off too much longer.

2
  • 1
    The thing to note here is that it's probably more than just the button that needs to be updated. OP will probably need to also evaluate the triggers (and classes run as a result of running the triggers) and update those as well.
    – Derek F
    Sep 29, 2022 at 23:15
  • @DerekF Those should probably be fine. It's just the JavaScript, as it's the public APIs that were deprecated, not specifically Apex code versions. Apex that old still runs just fine (I have some 10.0 classes I was able to test just now).
    – sfdcfox
    Sep 29, 2022 at 23:40

You must log in to answer this question.

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