function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Deyan Chugunov 7Deyan Chugunov 7 

Strange behavior of Standard Controller`s Save() method in Lightning Experience

Hello guys,

I need help finding a solution of an issue I got. So, I have overriden the Account`s Edit and New actions with my custom Visualforce page. This page is build dynamically, based on the used Layout. I collect all the layout fields and pass them to to the Standard Controller`s addFields() method. So far so good. When I open a given Account for Edit, everything works like a charm and the Account is edited and saved, but when I want to create a new one, I get an error message saying: No such column 'BillingGeocodeAccuracy ' on entity 'Account'.
The interesting thing is that the Account is actually created inspite the error message, which is shown only in Lightning Experience. I have debugged my code and checked the fields which I pass to the addFields() method - BillingGeocodeAccuracy is NOT one of them, but somehow is included in the SOQL query. I have found a work around which is to use insert instead of Standard Sontroller`s save() methodbut this does not seems right to me. This approach brings other issues like validation ruls not triggering for example. I would much appreciate any help on that. Thanks!
Andy BoettcherAndy Boettcher
Regardless of how you work with data in the system - validation rules/workflows/other business logic and code ALWAYS fire - there are no ways around that.

I'd say if you have a working solution - don't worry about it, other than planning to move your custom VF page to the Lightning Experience (via Lightning Components).