Can we not add global remote actions in patch for an application?


In e.g. Create and Upload Patches you will see that you can't:

No new Apex access modifiers, such as virtual or global, can be added.

As to why, imagine you have released version 1.0, 1.1, 1.2, 1.3 of your app and you have to create a patch of 1.2 called 1.2.1. If the global was allowed, then customers who installed that 1.2.1 patch could start writing code or declarative components that use that global. Then when they eventually try to upgrade to 1.3, that upgrade would fail because the global their org depends on is not present in 1.3. And that would break the reassuring guarantee that upgrades are always possible.

(While we might want this mechanism to be more flexible, that is the way it is implemented.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.