to-do list in lightning component

Develop a Simple To-Do List App With Salesforce Lightning Component

Lightning Component

Hey guys, today in this post we are going to create a very simple custom To-Do List app with salesforce lightning component and custom object.

to do app demo salesforce
Output
Prerequisite :
  1. Create salesforce custom object with following custom fields :
Resource Name [API] Type Description
Custom Object ToDo__c To store To-Do Items data in Salesforce database
Custom Fields Description__c Long Text Area To-Do task description
Due_Date__c Date To store due date of task
Reminder_Date__c Date To store reminder date of task
Name Auto number Standard field
Step 1 : Apex Controller :

Step 2 : Lightning Component :

JavaScript Controller :

JavaScript Helper :

  • Check code comments.
Output :

to-do app demo salesforce

Related Resources :
Other popular Post :

Like our facebook page for new post updates. & Don’t forget to bookmark this site for your future reference.

if you have any suggestions or issue with it, you can post in comment box.

Happy Learning ?

About The contributor: 

Kiran.B

4 Post Contribute

kiran b sfdcMonkey

I have 3.5 years of experience and working in lightning for the past 1 year. I am working as a developer in Deloitte.

Skills : Apex ,lightning , visualforce,sales cloud,JavaScript,Einstein analytics

 

 

Post By Kiran :

  1. Custom Mass Approval Screen In Salesforce Lightning Component
  2. How To Implement Infinity Or Lazy Loading In Salesforce Lightning DataTable
  3. How To Implement Column Sorting In Salesforce Lightning DataTable
  4. Develop a Simple To-Do List App With Salesforce Lightning Component
(Visited 12 times, 1 visits today)
(Visited 7,865 times, 1 visits today)

17 comments

  • This page has an error. You might just need to refresh it. Aura.loadComponent(): Failed to initialize application. COMPONENT markup://c:ToDOList is missing required attribute ‘alternativeText’

    i am getting error like this can you help me on this.

     

    • Can Someone please tell me how would I add the delete functionality. Actually I have got stuck, where I Want to show a delete icon whenever a new todo task is created it should show just right after the reminder date, but I dont know how to get that delete icon dynamically

  • This page has an error. You might just need to refresh it. Aura.loadComponent(): Failed to initialize application. COMPONENT markup://c:ToDOList is missing required attribute ‘alternativeText’

    i am getting error like this can you help me on this.

  • Hi Pavani,

    Please replace,

    <lightning:buttonicon iconName=”utility:chevrondown” onclick=”{!c.toggleForm}”  alternativeText=”Toggle” />

    in place of,

    <lightning:buttonicon iconName=”utility:chevrondown” onclick=”{!c.toggleForm}” />

    Your problem will be resolved.
    Happy Learning 🙂

  • This page has an error. You might just need to refresh it. Error in $A.getCallback() [Cannot read property ‘setParams’ of undefined] Callback failed: apex://ToDoController/ACTION$saveTodoRecord Failing descriptor: {c:ToDoListComp}

     

    used the same code but i got this error …can you please check on this

    • do not test it with stand alone lightning application because force ‘showToast’ and ‘refreshView’ events are handled by the app container. It’s supported in Lightning Experience, Salesforce app, and Lightning communities.

    • in this post we are just try to demonstrate that how we can develop own custom to do-list functionality in salesforce using custom lightning component. this will more flexible and control will be in hands.

  • Thanks for the article. While trying this code as a feedback form, I’m encountering following issue. Please help to find the cause.

     

    This page has an error. You might just need to refresh it. Action failed: c:FeedbackComp$controller$saveFeedback [Cannot read property ‘reduce’ of undefined] Failing descriptor: {c:FeedbackComp$controller$saveFeedback}

Leave a Reply