1

Validate Getter and Setter Access Modifier Enforcement During Visualforce Expression Language Parsing (Release Update)

https://help.salesforce.com/s/articleView?id=release-notes.rn_vf_get_set_access_modifier_ru.htm&type=5&release=238

What is the impact of this update and what changes has to be done before enabling this?

3 Answers 3

4

What is the impact of this update

Generally speaking, there were some situations where you could access methods and properties you were not meant to. As far as I can tell, this only applies when a managed package has code like the following:

global class CustomVFController {
  public String message { get; set; }
}

And you were to write code like the following:

<apex:page controller="OtherNS.CustomVFController">
  {!message}
</apex:page>

It may have been previously accessible but would not be after the update.

what changes has to be done before enabling this?

This feature should be "test run" enabled, and all Visualforce pages should be tested to make sure nothing broken. For most subscribers, I suspect that no changes will be necessary. For ISVs, they will need to test their packages to make sure that their code will continue to work for their subscribers after the update is enabled.

2
  • What if some VF pages won't work as expected?
    – Prathyusha
    Jul 12, 2022 at 9:24
  • @Prathyusha As far as I can tell, this can only happen with respect to managed packages, so if something doesn't work, it most likely means you'll have to work with the vendor to fix the problem. The solution will be to change public to global for properties that need to be updated.
    – sfdcfox
    Jul 12, 2022 at 13:47
1

I opened a case with Salesforce support and asked them about this. They replied "This release update will be for all the VF pages not only the managed packages". However I could not reproduce this myself.

1

This release update has been postponed indefinitely and is not enforced in its present form.

https://help.salesforce.com/s/articleView?id=release-notes.rn_vf_get_set_access_modifier_ru.htm&type=5&release=240

You must log in to answer this question.

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