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

3 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. How To Implement Infinity Or Lazy Loading In Salesforce Lightning DataTable
  2. How To Implement Column Sorting In Salesforce Lightning DataTable
  3. Develop a Simple To-Do List App With Salesforce Lightning Component
(Visited 1 times, 1 visits today)
(Visited 4,414 times, 1 visits today)

15 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.

     

  • 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