Customize Activity Composer In Lightning Experience
Are you working on Lightning experience? Then definitely you love the new Lightning Activity Composer window. On Salesforce Answer Community the most rated question on Lightning Experience is How to customize Activity composer for Sobjects? I personally phased issue while working on activity composer window to customize the activity composer for New Task or Log A call. So i am writing this post to give step by steps solutions for this issue.
You can see some similar questions here :
1.https://success.salesforce.com/answers?id=9063A000000iSIiQAM
2.https://success.salesforce.com/answers?id=9063000000046ffAAA
3.https://developer.salesforce.com/forums/?id=906F0000000MKPiIAO
Business Example :
Tonny working as a System administrator in Universal Container. He working on Lead to track all activities with a representative and wants to track the “Type” of task on Activity(Task) level in Lightning.
Issue: When we goto Lightning Lead object activity composer and create new Task then we are having By default Subject, Due Date, Name, Related To, Assigned To and Status of Task on new Task composer window. This is standard action so we can’t customize this in lightning.
Business Solution: Here we can create new custom action on Lead object for New Task and will customize as per our business need. Follow these steps to create new action for New Task in Lightning Experience.
Step 1 : On object detail page click on Setting Gear Icon on top of the page > Edit Object
Step 2: Goto >Edit Object page >Click on >Buttons, Links, and Actions
Step 3. Click on New Action
Step 4. On New action page
(i). Action type : Choose create new record (We want to create new records here)
(ii). Target Object : Here we want to create Task so we choose Task.
(iii). We can use any Standard label for new actions
(iv). We can also modify label as per our need.
(v).We also have control over the success message after our action fire in Lightning.
Step 5. After save it will promot new page layout to customize the fields which we want to display on new action composer window. So here i drag and drop the Type field from fields section to page layout and then save the layout.
Step 6. Then goto Object page layout>Edit the Layout> And drag and drop the new custom New Task action to Salesforce1 and Lightning Experience ations and remove the standard New Task action from layout.
Step 7. After save the layout goto Lead detail page and in activity composer click on New Task. Now you can see here Sales user can easily track the Type of task while working on lead in Lightning experience.
In the same way we can customize any objects actions in Lightning experience. Kindly let me your feedback in comment section below.
Hi Pritam,
Great artical here I’ve been looking everywhere for a similar solution. My question is will this also work for the “Log A Call” tab in the activity component. I cant find a way to add the Type field to be available
LikeLiked by 1 person
Hi Dylan,
Glad to know that you liked it. Yes it will work for Log A Call as well. You can add a Type field there if it’s not already there and you can customize window composer using above steps. Let me know if you having any issue with it. So i can assist you. Thanks
LikeLike
This worked perfectly! Thanks again for the help here!
LikeLiked by 1 person
Glad to know it helped !! Good Day 🙂
LikeLike
Hi Pritam
Great article, just one more thing, how can I make “Name” field searchable as it in the original button. It looks fixed in your screenshot too.
LikeLike
Hi Ali,
It depends on where you are trying to add new activity. If you create new activity on contact / Lead it will automatically fill Name field from the contact/Lead name . In the same way it will work for related to. Let me know if you having any other issues.
LikeLike
Great article, there is so little concise information about working with Lightning Experience in real world application. Thank you.
LikeLiked by 1 person
Hi Pritam – thanks for the great article. Very helpful. Can you be more specific about how to put the type field on the existing Log a Call form? I can’t find anywhere to add a field to that action. Or, is the only option to create a new Log a Call form?
Thanks,
Chris
LikeLike
Hi Chris – Glad to hear that you liked it !! Yes as of now the only way to add type to Log A Call to create new action as i mentioned in above post. Let me know if you want more information about it.
LikeLike
Hi Pritam, great article. Thanks for taking the effort to share your knowledge on this topic. It was very helpful!
LikeLiked by 1 person
Great article, but something is doing wrong in my own salesforce session. I followed step by step, but I cannot get any change on Activity tab, either for opportunity and for contacts. I checked again and again, I desinstalled a former package that had created actions like log a call …, I checked the record type action and attribution pages but still no success. I’am about to open a case to salesforce support but I fear long delays to reply or identify what is wrong. Anyway something is going wrong in my session because in ligthning, I cannot add a new contact to an account if I use the button located in contacts zone. I can type information when window opens but cannot save. It works if I use the new contact button in the header. It says correct the error before saving but there is no error ???
If you could help that would be great. rgds
LikeLike
Yes sure let me know what issue you are having right now. Can you send me details to shekhawat.i4u@gmail.com? also verify that if you are using record type on activities then you have to create custom action there.
LikeLike
Hi Pritam, I have created the new action as Log a call, however it Name field I cannot add multiple name, I wanted to Log a Call against multiple contact do you know what should I do to suffice this?
I have already enabled the Activity Setting to add multiple contacts. In fact in standard Log a call I can add multiple contacts.
LikeLike
Hi Anjali,
This is a limitation of Lightning as of now we can’t use Multiple Contacts on a single activity (task or event) in Lightning Experience. Take a look here https://success.salesforce.com/ideaView?id=0873A000000E51EQAS
LikeLike
Hi its really awesome article, i have followed the Steps and added new Task into Lead Activity and when i click New Task it showing default Record Type( Which was mentioned in Global Actions ) But i have different Record Types for Task record to create and want to choose the record Type while creating a Task. Please help me how to achieve This?
LikeLike
Hello Shan, You can create a new action with respective record type for the task using above steps. Kindly let me know if you have any issue.
LikeLike
Thank you so much Pritam. I am a first time visitor to your blog but I really loved the structure of your article and how the step by step process was so succinct. I will be bookmarking this site and returning often.
Thanks again.
LikeLiked by 1 person
Thanks @Alfonso Glad to hear that you liked it 🙂
LikeLike
Thanks!!
LikeLiked by 1 person
Salesforce provides exactly ZERO guidance on how to accomplish this. It is so important and yet to cumbersome, thank goodness for Pritam Shekhawat, you are certainly my MVP!
LikeLiked by 1 person
Salesforce provides exactly ZERO guidance on how to accomplish this. It is so important and yet to cumbersome, thank goodness for Pritam Shekhawat, you are certainly my MVP!
LikeLiked by 1 person
Thanks a lot, @Pinchvalve for your feedback. Glad to hear that you liked my solution.
LikeLike
Hi Pritam,
You maintain a great blog. Good stuff. Need you suggestion on an approach. We want to include a lightning component on a new task screen. As customizing standard record creation screen is not possible, we are travelling towards building the task creation screen. Can you suggest if going that route is scalable Looking forward for your response.
Thanks,
Sri
LikeLike
Hello Sri, Thanks for your feedback. Yes, it totally depends on your business use case. Either you can go with custom quick action for task or you can develop your custom component using base component/Custom logic based on your use case.
LikeLike