Inline Editing in Visualforce page

Inline editing in Visualforce was introduced with the Spring'11. It has the ability to turn on inline editing within Visualforce, a handy bit of user friendliness which has been availability in the standard application interfaces for some time. Enabling inline editing is simple. My example is related with the Contact Standard object. But this feature will work with custom objects as well.
<apex:page standardController="Contact">
<apex:form >
<apex:pageBlock mode="inlineEdit">
<apex:pageBlockButtons >
<apex:commandButton action="{!edit}" id="editButton" value="Edit"/>
<apex:commandButton action="{!save}" id="saveButton" value="Save"/>
<apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel"/>
</apex:pageBlockButtons>
<apex:pageBlockSection >
<apex:outputField value="{!contact.lastname}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
hideOnEdit="editButton" event="ondblclick"
changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
<apex:outputField value="{!contact.accountId}"/>
<apex:outputField value="{!contact.phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

Just copy and paste this code in your visualforce editor. After run it obviously you will not see the values in output fields. Just append the URL with some contact object id as follows.

Ex:
https://yourOrganizationLink/apex/yourVFPageName?id=someCantactObjectId
https://c.ap1.visual.force.com/apex/InlineEditNew?id=00390000005ZFzB

Comments

  1. This works, except the "Save" and "Cancel" buttons are always visible when I try to use this code example. The "Edit" button DOES disappear when I double-click a field (go into inline edit mode), but the "Save" and "Cancel" buttons are there all the time (regardless of whether or not I'm in inline edit mode).

    ReplyDelete
  2. Use style="display:none;" in your button attributes.

    ReplyDelete
  3. I need help with a related issue. Calling the {!save} method during inlineEditing in an is not working for me. See all the details ere:

    http://boards.developerforce.com/t5/Visualforce-Development/Using-save-from-an-apex-button-during-inline-editing/td-p/377641

    Please help me if you can

    dfpitt

    ReplyDelete
  4. Sorry, the words "apex:detail" got deleted. Here is the post again:

    I need help with a related issue. Calling the {!save} method during inlineEditing in an "apex:detail" is not working for me. See all the details here:

    http://boards.developerforce.com/t5/Visualforce-Development/Using-save-from-an-apex-button-during-inline-editing/td-p/377641

    Please help me if you can

    dfpitt

    ReplyDelete
  5. Hi,

    Although i kept 3 page block buttons in the above code, i still could not see the edit button.

    Could you please let me know as to why ?

    On changing the action of edit button to the save one, i am able to get the button.

    ReplyDelete
  6. Hi I am trying to get a save button in "inline edit mode" for pageblock table which is rendered based on picklist value, For this scenario the page block save button is not displaying

    Can you please help me out with this !!

    ReplyDelete
  7. Can we capture the value of the InlineEdited field in the Apex Controller....??

    ReplyDelete
  8. Thanks for sharing informative article on Salesforce technology. Your article helped me a lot to understand the career prospects in cloud computing technology. Salesforce.com Training in Chennai

    ReplyDelete

  9. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

    ReplyDelete
  10. It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command
    java training in chennai | java training in bangalore

    java online training | java training in pune

    java training in chennai | java training in bangalore

    java training in tambaram

    ReplyDelete
  11. Woah this blog is wonderful i like studying your posts. Keep up the great work! You understand, lots of persons are hunting around for this info, you could help them greatly.
    Hadoop Training in Chennai
    Hadoop Training in Bangalore
    Big data training in tambaram
    Big data training in Sholinganallur

    ReplyDelete
  12. Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.

    rpa training in marathahalli

    rpa training in btm

    rpa training in kalyan nagar

    rpa training in electronic city

    rpa training in chennai

    rpa training in pune

    rpa online training

    ReplyDelete
  13. Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    Devops Training in Chennai

    Devops Training in Bangalore

    Devops Training in pune

    Devops training in tambaram
    Devops training in velachery

    ReplyDelete
  14. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
    Devops Training in pune
    Devops Training in Chennai
    Devops training in sholinganallur
    Devops training in velachery
    Devops training in annanagar
    Devops training in tambaram

    ReplyDelete
  15. Thank you for allowing me to read it, welcome to the next in a recent article. And thanks for sharing the nice article, keep posting or updating news article.
    Data Science training in Chennai
    Data science training in bangalore
    Data science training in pune
    Data science online training

    ReplyDelete
  16. Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.
    Best Selenium Training in Chennai | Selenium Training Institute in Chennai | Besant Technologies

    ReplyDelete
  17. Very Informative article you have described everything in a brilliant way. This is really useful arrticle for begginer learner. Appreciated!

    Cloud Training
    Cloud Training in Chennai

    ReplyDelete
  18. It’s a shame you don’t have a donate button! I’d certainly donate to this brilliant blog! I suppose for now I’ll settle for book-marking and adding your RSS
    fire and safety course in chennai

    ReplyDelete
  19. Hi,

    I need to give my customized text box with some styling when I double click on output field. Is it possible ? if yes then how to do?

    ReplyDelete
  20. This is an awesome post. Really very informative and creative contents. These concept is a good way to enhance the knowledge. I like it and help me to development very well. Thank you for this brief explanation and very nice information. Well, got a good knowledge.
    fire and safety course in chennai

    ReplyDelete

  21. Hello, I read your blog occasionally, and I own a similar one, and I was just wondering if you get a lot of spam remarks? If so how do you stop it, any plugin or anything you can advise? I get so much lately it’s driving me insane, so any assistance is very much appreciated.
    Android Course Training in Chennai | Best Android Training in Chennai
    Selenium Course Training in Chennai | Best Selenium Training in chennai
    Devops Course Training in Chennai | Best Devops Training in Chennai

    ReplyDelete
  22. This is an best post. It is Really very informative concept.I like it and help me to development very well.Thanks alot for this brief explanation and very nice information.
    Big Data Hadoop training in Chennai | Big Data Hadoop training in Chennai

    ReplyDelete
  23. Superb post, valuable and excellent article, lots of great information, thanks for sharing with peoples.


    ExcelR Data Science Course in Bangalore

    ReplyDelete
  24. After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article.
    data analytics certification courses in Bangalore
    ExcelR Data science courses in Bangalore

    ReplyDelete
  25. Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more.data science course in singapore

    ReplyDelete
  26. Wow, what an awesome spot to spend hours and hours! It's beautiful and I'm also surprised that you had it all to yourselves! Kindly visit us @ Best HIV Treatment in India | Top HIV Hospital in India | HIV AIDS Treatment in Mumbai
    HIV Specialist in Bangalore | HIV Positive Treatment in India | Medicine for AIDS in India

    ReplyDelete

  27. Great information on given topic and provide them to teacher our opinion and the article. I appreciate your post and look forward tomorrow.data science course in singapore

    ReplyDelete
  28. Nice blog with excellent design..Thanks for sharing valuable blog
    Taj Mahal Day Trip from Jaipur Ending in Delhi

    ReplyDelete
  29. Great blog. I appreciated perusing your articles. This is really an incredible read for me.
    Taj Mahal Travel guide

    ReplyDelete
  30. I learned World's Trending Technology from certified experts for free of cost.i Got job in decent Top MNC Company with handsome 14 LPA salary, i have learned the World's Trending Technology from Python training in pune experts who know advanced concepts which can helps to solve any type of Real time issues in the field of Python. Really worth trying instant approval blog commenting sites

    ReplyDelete
  31. Visit for AWS training in Bangalore:- AWS training in Bangalore

    ReplyDelete
  32. such a great word which you use in your article and article is amazing knowledge. thank you for sharing it.

    Become an Expert In Python Training in Bangalore ! The most trusted and trending Programming Language. Learn from experienced Trainers and get the knowledge to crack a coding interview, @Softgen Infotech Located in BTM Layout.

    ReplyDelete

  33. Nice blog..! I really loved reading through this article. Thanks for sharing such a amazing post with us and keep blogging...
    CRM Software in Denmark

    ReplyDelete
  34. Thank you for sharing this post
    Very nice post here thanks for it I always like and search such topics and everything connected to them.

    CRM Software in Denmark | CRM Solutions

    ReplyDelete
  35. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!

    artificial Intelligence course

    machine learning courses in mumbai

    ReplyDelete
  36. This comment has been removed by the author.

    ReplyDelete
  37. I was just browsing through the internet looking for some information and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject. Bookmarked this page, will come back for more.
    data science course in malaysia

    ReplyDelete

  38. Awesome article! It is in detail and well formatted that i enjoyed reading. which inturn helped me to get new information from your blog. After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article.
    Data Science Training In Chennai | Certification | Data Science Courses in Chennai | Data Science Training In Bangalore | Certification | Data Science Courses in Bangalore | Data Science Training In Hyderabad | Certification | Data Science Courses in hyderabad | Data Science Training In Coimbatore | Certification | Data Science Courses in Coimbatore | Data Science Training | Certification | Data Science Online Training Course

    ReplyDelete

  39. This post is great. I reallly admire your post. Your post was awesome.
    data science course in Hyderabad

    ReplyDelete
  40. "Thanks for the useful information. Your article is beneficial for us and those who are searching for
    Handy Coder for mrp and date printing
    "

    ReplyDelete
  41. This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck.

    Simple Linear Regression

    Correlation vs Covariance

    Simple Linear Regression

    Correlation vs covariance

    KNN Algorithm

    ReplyDelete
  42. Thanks for this post. It proves very informative for me. Great post to read. Keep blogging.

    If you are looking for the top security companies in London that provide its customer with remarkable security services. Check out this site for security services and rubbish clearance services

    ReplyDelete
  43. Thanks for this post. It proves very informative for me. Great post to read. Keep blogging.

    If you are looking for the top security companies in London that provide its customer with remarkable security services. Check out this site for security services and rubbish clearance services

    ReplyDelete
  44. Thanks for this post. It proves very informative for me. Great post to read. Keep blogging.

    If you are looking for the top security companies in London that provide its customer with remarkable security services. Check out this site for security services and rubbish clearance services

    ReplyDelete
  45. All details you describe in your blog post custom lipstick packaging wholesale is very informative for me. Customboxesu provides Custom lipstick packaging with suitable price.

    ReplyDelete
  46. I am looking for and I love to post a comment that "The content of your post is awesome" Great work!

    Simple Linear Regression

    Correlation vs Covariance

    bag of words

    time series analysis

    ReplyDelete
  47. Nice article and thanks for sharing with us. Its very informative



    Plots in PHARMA CITY

    ReplyDelete
  48. Thank you for posting informative insights, I think we have got some more information to share with! Do check out
    oracle training in chennai and let us know your thoughts. Let’s have great learning!

    ReplyDelete
  49. It is really a helpful blog to find some different source to add my knowledge. I came into aware of new professional blog and I am impressed with suggestions of author. You can also check us in this link

    ReplyDelete
  50. I read your article it is very interesting and every concept is very clear, thank you so much for sharing. AWS Certification Course in Chennai


    ReplyDelete
  51. This post is really amazing
    Village Talkies a top-quality professional corporate video production company in Bangalore and also best explainer video company in Bangalore & animation video makers in Bangalore, Chennai, India & Maryland, Baltimore, USA provides Corporate & Brand films, Promotional, Marketing videos & Training videos, Product demo videos, Employee videos, Product video explainers, eLearning videos, 2d Animation, 3d Animation, Motion Graphics, Whiteboard Explainer videos Client Testimonial Videos, Video Presentation and more for all start-ups, industries, and corporate companies. From scripting to corporate video production services, explainer & 3d, 2d animation video production , our solutions are customized to your budget, timeline, and to meet the company goals and objectives.
    As a best video production company in Bangalore, we produce quality and creative videos to our clients.

    ReplyDelete
  52. Infycle Technologies, the top software training institute and placement center in Chennai offers the Digital Marketing course in Chennai for freshers, students, and tech professionals at the best offers. In addition to the Oracle training, other in-demand courses such as DevOps, Data Science, Python, Selenium, Big Data, Java, Power BI, Oracle will also be trained with 100% practical classes. After the completion of training, the trainees will be sent for placement interviews in the top MNC's. Call 7504633633 to get more info and a free demo.Get Digital Marketing Course in Chennai | Infycle Technologies

    ReplyDelete
  53. I was just browsing through the internet looking for some information and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject. Bookmarked this page, will come back for more.
    data scientist course in hyderabad

    ReplyDelete
  54. Great post. keep sharing such a worthy information.
    SEO Training in Chennai
    SEO Course

    ReplyDelete
  55. Thank you for sharing your awesome and valuable article this is the best blog for the students they can also learn.

    ReplyDelete
  56. Experience unmatched peace of mind with Invigilo's cutting-edge Video Security System - Safeguarding what matters most, 24/7.

    ReplyDelete
  57. Buy Kratom Amazing Botanicals provides high quality kratom products you'll love. Try our diverse selection of expertly crafted kratom capsules and powders today.

    ReplyDelete
  58. "Experience nature's best with Kats Botanicals - Your gateway to premium botanicals, exclusively at Kratom Point."

    ReplyDelete
  59. Explore top-notch Docker consulting services to optimize containerization strategies. Unlock efficiency and seamless deployment for your business success.

    ReplyDelete
  60. This allows for direct editing on the page and saving the changes back to the Salesforce object. For more advanced features, JavaScript can be used for custom validations or to handle multiple field edits simultaneously.
    Data science courses in Pune






    ReplyDelete
  61. Fantastic post! Inline editing is such a useful feature, and you explained it so clearly. Appreciate the effort you put into this article!
    Data science Courses in Sydney

    ReplyDelete
  62. This post on inline editing in Visualforce pages is very helpful! It’s great to see such a clear explanation of how to implement this feature in Salesforce. Thanks for sharing such a practical guide!
    Data science Courses in Canada

    ReplyDelete
  63. Fantastic explanation on inline editing in Visualforce! This feature is so useful for creating more interactive and user-friendly pages. Your example code is clear and easy to understand. I'll definitely be using this in my Salesforce projects. Keep up the great work
    Data science courses in Glasgow

    ReplyDelete
  64. Inline editing in Visualforce, introduced in Spring '11, brings enhanced usability by enabling direct edits on records. This feature supports both standard and custom objects, simplifying data updates. Implementing it is straightforward, adding a user-friendly touch to your pages.
    Data science Courses in City of Westminster

    Neel KBH
    kbhneel@gmail.com

    ReplyDelete
  65. Thank you for the brilliant blog.
    https://iimskills.com/data-science-courses-in-berlin/

    ReplyDelete
  66. An excellent guide for understanding inline editing in Visualforce pages. A useful resource for Salesforce developers!
    Data science courses in France

    ReplyDelete

Post a Comment

Popular posts from this blog

Do you want to be certified as a Salesforce Admin?

Displaying pop-up summaries on hover in visualforce

Unit Testing in Salesforce