Data updates are not reflected in UI after a Visualforce+Apex update in Lightning Experience

Apex , VisualForce , Lightning

Last updated Yesterday ·Reference W-3535908 ·Reported By 561 users

In Review

Summary
When data is updated from an Apex controller and redirected to the detail page in Lightning Experience, the updated data is not seen in the UI, even though the data is updated in the database.

This is an intermittent behavior and could happen when we are performing the updates continuously and redirecting to the page, with in a span of 30 secs.

If the same transaction is repeated after 30 secs or more no issues observed.

This issue is because of some cache issues with the Lightning Experience

This behavior will be observed only if there are redirections between Visualforce and Lightning pages.

No issues observed when the same functionality is implemented in Lightning.

Repro
- Create a VF page with below code:
<apex:page standardController="Account" extensions="MyPageController">
<apex:form >
<apex:commandButton value="Increment Revenue" action="{!incrementRevenue}"/>
<apex:inputHidden value="{!Account.AnnualRevenue}"/>
</apex:form>
</apex:page>


- Create related controller with below code:

public class MyPageController
{

public MyPageController(ApexPages.StandardController controller)
{
this.controller = controller;
}

public PageReference incrementRevenue()
{
Account a = (Account)controller.getRecord();
a.AnnualRevenue = a.AnnualRevenue + 1;

return controller.save();
}
}

- Create a custom detail page VF button on Account object with this VF page.(this issue can happen on any object, account is just taken as reference)

- Now navigate to Lightning Experience view.

- Open any account record

- Click the custom button and this will increment the AnnualRevenue field by 1 and when you are redirected back to Account detail page you don't observe the updated AnnualRevenue.

- If you don't see the issue try repeating the steps immediately.

Workaround
Updates made to Lightning Experience and Salesforce app components may occasionally not be reflected in the UI. Updates initiated by a different user or a different channel (API, Apex Trigger, etc) require an additional mechanism in order to update the UI.

The recommended solution is to refactor the component to use Lightning Data Service (force:recordData). Lightning Data Service provides a performance increase and eliminates out-of-sync issues. If you can’t refactor your component to use Lightning Data Service, you can also use force:refreshView to request a page refresh.

Updates
3/13/2018: Added workaround

Reported By (561)

Adakole Kennedy Vinay Dahiya Tarandeep Kaur Sahney Maria carmencita Dela Cruz Valentyn Bilenkyi Dennis Cole Anthony Sanchez Mike Craven Albert Aspin Fernando Fernandez Ian Legler Eric Christophels Mayank Shah Justin Carlson Mark Masterson Jonathan Klein Fayas Mansoor Saheb Samanta Ashish Goel Jo-Jo L Abhishek Jyoti Dave Wolfe Kanhaiya Yadav 平 沈 Pratik Raut 政弘 久我 Vikram Anisetty Ruben Blancquaert Marko Stankovic Jagan Challa Keith Clarke Jyoti Mariwalla James Wong Andreea (Annie) Dillon Alessandro Monteriso Chris Wagner Tony Cardone Austin Coultas Codrin Morhan Venkatesh Kakolu Klaas Minten Guy Clairbois Guy Clairbois Riley Byrnes Madan Morusu Jodie Legg Amrita Sidhu Paweł Fronczak Sebastian Lech 剛士 岩下 Dan Dodson Ed Castillo Jose Lopez E.J. Wilburn Ramya Ragavan Vince Carr Chris Ernest Dennis Wittmann Maria Becker Michelle Regal Stuart Edeal Kyle Hutchinson Ryan Beagle Kavi Kumar Javier Coca Jelle van Geuns Anish singh 亜季 岡本 sagar sadhnani Shen Zhang Vincenzo Trezza Dinesh Murahari Karthik Kannan DuraiPandi Thirukkodi Ravi Shankar Kandepi Sushanth Kallem (MCS) Juan Pablo Escobar Kelsey Fenn Tim Nicholls Sravan Podapati Sanjeev Kumar Matt Montaruli Matt Nelson Surabhi Suman John Poston Pravinkumar Janarthanan Brandon Fitch Riyas Basheer Erik Peterson Weiguang(David) Dai Meera RNair Elias Pinheiro Charlotte Dawson Nersi Ramazannia Gaurav Jain Adriana Reyes Andreas Schaefer Tobias Forstmeier Doug Ayers Christian Kaimel Robert Karran Elisa Williams Cory Cowgill Marcell Csiszar Marcell Csiszár Karthi Velu Daniel Romero Kaeli Saner Vignaesh Ram Amarnath Sebastiano Bertani Neonila Ivanov Mark Hempen Sénior QA LF90' Sathish Venkat Eric Smith Carmen Nixon Maarten Devos Max Robert Aureo Serrano Bogdan Pavlyk Ashwin Dash Simge Gizem Özcan James Buhagiar Narendhar Reddy Sharan Swabik T Sand ishaan motwani Rajesh Varma Mudunuri Karthikeyan Saravanan John Yodha Abhijit Shrikhande Kindy Tice Aníbal García García Ramesh Varatharaj Stephanie Stylianou Christopher Thaxter Clayton Mohlman narendhar reddy Rupert Barrow Sangeeta Rani Sebastian Schwarz Gurpreet Kaur Matharu Marcio Fritsch Daniel Hoechst Michael Le Rohith Reddy Adulla Steve Atherton Anchal . Sameer Prasonn Barath Laxmi Bandaru Pedro Molina Alberto Lozano Jack Creighton Cristina Sanchez Miguel Cabrera Carlos Osorio Alvaro Vaquero Daniel Exposito System Administrator Victor Garrido Matas Gustavo Ojeda Diego Granados Alberto Contreras Agustin Jiménez Jose Luis Carmona First user Summer 18 Jeronimo Guerrero Mar’ía Jesœús Puertas Morales Alberto David Fern‡ández Fern‡ández José Antonio Campaña Jesus Martinez Fernandez David Gamarra System Administrator Pablo Rubio Sanchez Miguel Moro Álvarez Alba Azcona Jukka Hakala Nino Bustillos Michael Rothwell Brad Struss Ankur Malkani Anjan Samanta Miguel Mora Mohd Hafizi Khiruddin Jason Hardy Paritosh Sharma Llyr Jones Warren Mangahas Rob Power Cristina Perez surya rudraraju Marina AUTIN Safal Kondawar Sean Singer Richard Mills Sarath Reddy Jessica Fischer Hayden Mcleod Shailendra Singh Lucas Supinski Leo Li Stefan Talkenberg Grant Hamlyn Donny Riyadi Santoso Joel Richards 達也 岩﨑 Kiran Chalamalasetty Victoria Paul Chetan Pradhan Tony Ly Susil Sahu Pankaj Agrawal Raghav Sharma Dustin Cutsforth Priyanka RVL Nino Bustillos Pasan Eeriyagama Peter Byrne Rich Bechtold Updesh Singh Dan Goldberg Jarvis Howard Dawn Strickrott Gary Foster Loubna El Amine Brigette Sjoboen Jaana Tanskanen Megan Parmer David Jenkins Arpit Vashishtha Swapnali Veer Ashley Nhan Ashley Nhan Ashley Nhan sugandha atrey Cheryl Curry Tom Ford Rob Mendham Adam Davidson Matt Hofmann Ernesto Valdes Waqar Hussain Maximilian Benning Adam Peth Kevin Vizcarra Joseph Desch Seth Boid robert Maxson Christopher Hickman Brad Harvan Anders Windell Kristen Owens Julia Neaves James Walker Zeke Baied Joseph Redfern Lane Colyer Austin Turner Rob Halcomb David Roberto Venegas Aldo Fernandez SAQUIB SHAIKH Dimitris Sgourdos vineeta verma Uvais Komath Luca Steinmetz Javier Fernandez Orodea Javier Gallego Shweta Mahapatra Data Migration Juan Benitez Maal Rahul Kumar Lyubov Sherkunova Дмтирий Борисов Raymond Airey Dave Womer Andreas Anagnostopoulos Emily Gilbertson Vedha Sundaram Narmadha Meiarasu Barath Kumar Sivasankari Muthu Suganya Balaji Ashwani Soni Fernando Avella Karl Jensen Deepak Radhakrishnan Nitin Agrawal Mostafa CCAdmin Kumar Sarkar Casto Gutiérrez Ávila Alberto Pina Rafael Perez Pau Vila Alberto Pina Marta Alonso Priyanka Akkineni Saima Abrar Artem Kalus Kondal Reddy Kontham Gordon Derk Tom Fuda Tom Tavernier N. N. Brad Wright Svetlana Shenderov Mark Wraith Gautam Sharma Ninja Lehtonen Allison Klein Gaurav Saraswat David Esposito mallikarjunarao punugupati Basil Claverie Asif Kutagulla David Derrier Maureen Johnson Lorael Arnquist Ivan Benito Alexander Günnel vamshikrishna metta Patrick Currin Cory Bartholomew Stefan Ropte Ahmed Keshk Vinayak Kaistha Kalyan Vennamaneni James St Jean vamsi I Viktar Apet Tejaram Nidamanuru Julian Ahrends Akbar Rafiuddin PrePkgOrg Stefan Ropte Tobias Tillack Pascal Clausen Jacek Fiszer Nathan Hinchey Frederick Valle Leela Krishna Nalluri Luke Van Blaircum Johnny Vu Sharath Konda Suryasree Dantuluri Julio Mario Moreno Craig Hayashi Sagar Thoriya Jeffrey Morgenstein Dave Craigmile Mohammad Asim Ali IT Admin 정모 남 Elly Bockley sharan swaroop Bikkumandla Support Cloud Innovation David Hemler Pradheepan Kirubanandan Kevin Hart Nimish Thakkar Gaurav Jain Sam Friedewald Brian Shor Borbála Kuslits Rakhi Rajput Bryan Guzman Ellias Zainea Ryan Stephens Cory Cowgill Redoine KADI Sudarshan Karanth Gordon Bockus Kris McKee Arun Kumar Richard Wintle Jesus Alan Sandoval Ana Lomibao Toby Compton Côme Habran Pratyush Kumar Rachel Benson Luigi Mattera Bushra Salman Abhishek Bansal Hiroshi Yoshita Ryo Yamamoto Rupesh Bhatia Marek Smerak Sai Sathish Kethu Takahiro Kawabata pkg dnbtsr.cbi Ezequiel Guillermo Martinez Quiroga Leandro Rodrigo Nunez Garth James BESUFEKAD BIRU Michael Siegel Nitish Prasad Tharun Kumar S Andrew Lokotosh Brittany Bates Karen Caligiuri Enable Admin Gyanendra Singh John Crimmings Sulabh Kapoor Soporte Sedecal Bryan Heidenreich Amy Hayworth Himaja Katragadda Jerry Lai Drew Piston Derrek Harrison Marc Marcet Paras Dhingra Alex Nicholas Patty Admin Martin Pongratz Manthan Shah Igor Filatov Mike LaVigne Chaitanya Devarapalli Deepesh Makkar ALEKHYA RAVULA Crystal Rochlitz Angus Alves Ricardo Solano Michael Richmond Jyot Thakkar Dan Iorg Zakaria Bousaid Côme HABRAN chakib lemkhantar Roger Farrow Spencer Kohler Krishna Ganugapati Karan Khanna Ramon Out Piyush Sharma Lorna Damren Yury Bondarau P Naraharisetti Andreas Schuierer Sara Woodman Roberto Brandao Michelle Jensen Katie Anderson Lonna Williams Michael Miller Mason Gray Mikel Truman Lori Stephens gaurav arora Swati Marda Mitchell Woloschek Rahul Sharma Sravan Pinninti Neal Morgan Trent Morrison Karan Khanna Himanshu Kaushal Anurag Ranjan pradeep kumar manegalla Dan Stark Jake Darling Cesar Parra Yogesh Arora Srini Venkatasamy Aaron Uttley Martin Lezer Hannah O'Connor Tianhao Wu Kothandaraman Narasiman Sasitharan P Robert Collins Maciej Słomka Rajasekhar Reddy Nathan Yung Matt Nadeau John Fulton Vinaya Daware Kanhaiya Diwan santosh kulkarni Narendra Garud Nitin Negi Neena Ahirrao Guha Nitin Negi Mayur Shastri Kiran Ande Ashish Kulkarni Abhishek Das Nakul Malhotra Ryan Morden John Stamers Jocsan Diaz Shift CRM varsha salunke Sudha Kumari Virginia Leandro Benny Varghese Angad Pathak Chetan Bhelonde VEERAKUMAR VADIVELU Rajni Patil Nilesh Jagtap Nathaniel Sombu Mahesh Adi A.J. Angus IT Support User Romain Vernay Admin Admin Prashant Raiyani Cindy FRANCE Anagha Sulakhe Dev TNOPPV5 Roger Borges Grilo Julian Azzam Roman Belokon Santosh Bajjuri Marka Grimes Varun Chaddha Dan Howell David Casper Steve Stockstill Ferdinando Isernia Jeremiah Dohn Lakshminarayana Medikonda Christophe Boucquet Matic Repše Camelia Militaru Delia Di Bona Joyce Coquico Nidish Rekulapalli Andrea Azzola Francesca Deplano Francesco Del Favero Enrico Murru WR Dev Valerio De Rosa Christian Tinghino Ivano Guerini Fabien Taillon Jason Curtis Abdul Basit Asia Naseer Surabhi Menon Orkhan Shukurov Tom Kovar Anuj Maheshwari Cédric ARNAL Laetitia HERON UserMOA UserMOA Polline HAK Adil HASSNAOUI Anwar TREDANO Luca Nardini Ciro De Felice Pritam Shekhawat Mahmood Butt Michael Welburn Eugene Rusalev Andrew Fawcett David Frudd

Is it Fixed?

AP0 AP1 AP3 AP4 AP5 AP6 AP7 AP9 CS1 CS2 CS3 CS4 CS5 CS6 CS7 CS8 CS9 CS103 CS109 CS108 CS107 CS106 CS105 CS102 CS101 CS100 CS10 CS104 CS115 CS11 CS116 CS12 CS13 CS14 CS15 CS16 CS17 CS18 CS19 CS20 CS21 CS22 CS23 CS24 CS25 CS26 CS27 CS28 CS30 CS31 CS32 CS33 CS40 CS41 CS42 CS43 CS44 CS45 CS47 CS50 CS51 CS52 CS53 CS54 CS57 CS58 CS59 CS60 CS61 CS62 CS63 CS64 CS65 CS66 CS67 CS68 CS69 CS70 CS71 CS72 CS77 CS78 CS79 CS80 CS81 CS82 CS83 CS84 CS85 CS86 CS87 CS88 CS89 CS90 CS91 CS92 CS93 CS94 CS95 CS96 CS97 CS98 CS99 EU1 EU4 EU6 EU7 EU8 EU9 EU10 EU12 EU13 EU14 EU15 EU16 EU17 EU18 EU19 NA3 NA6 NA7 NA8 NA21 NA24 NA29 NA30 NA31 NA32 NA33 NA34 NA35 NA37 NA38 NA39 NA40 NA42 NA43 NA44 NA45 NA46 NA47 NA48 NA49 NA50 NA51 NA52 NA53 NA54 NA55 NA56 NA57 NA58 NA59 NA60 NA61 NA62 NA63 NA64 NA65 NA66 NA67 NA68 NA69 NA72 NA73 NA74 NA76 NA77 NA78 NA79 NA86 NA87 NA88 NA99

Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.