Skip to main content
8 votes
Accepted

Remove tabs from activities in lightning

For removing the actions in Lightning, Go to Setup->Object Manager then select the object. Go to page layouts and edit the Page layout currently assigned. Under "Salesforce Mobile and Lightning ...
Sanket Mandhare's user avatar
7 votes
Accepted

New Task Action missing in Lightning Experience

When viewing the Activity composer related list, you may notice that some activity actions within the lightning experience do not appear on records even though those actions have been added to the ...
Diksha Goel's user avatar
7 votes

Entity 'Task' is not supported for semi join inner selects

You need to split out a separate query. As the error states, you can't use this join: Id NOT IN (Select WhatId from Task) One possible approach to splitting out the query: Set<Id> ...
Adrian Larson's user avatar
  • 151k
6 votes
Accepted

get all task related to contact in developer console

You will need to SOQL Contact first then feed the Tasks List with those ContactIds to get the related Tasks. Contact SOQL Contact[] cons = [SELECT id from Contact ]; Now, feed these ContactIDs to ...
Mahmood's user avatar
  • 6,006
6 votes
Accepted

Apex trigger not creating task

What is wrong with this specific code, why is it not creating a new task on the donation? You didn't actually call the code that commits data to the database, as in: insert taskList; Which you ...
sfdcfox's user avatar
  • 502k
6 votes
Accepted

How to use an Apex Email Service to store emails on a record EXACTLY as Salesforce does?

From what I understand, You don't need to create a task to insert an EmailMessage. Email message has relatedToId field which you can use to directly link it to any desired record. As relatedToId is ...
Pranay Jaiswal's user avatar
5 votes
Accepted

No such column 'Type' on entity 'LookedUpFromActivity'

If you look at LookedUpFromActivity object. There is no Type field, instead you can use ActivityType or ActivitySubtype field
Raul's user avatar
  • 18.9k
5 votes
Accepted

SOQL aggregate functions do not work with Task.ActivityDate

I have found a workaround by creating a custom field of type date under the Activity object called ActivityDate__c. Thus we can reformulate the initial query as SELECT WhoID, COUNT(Id), MIN(...
catalandres's user avatar
5 votes

Where is metadata for custom list view on Task?

Adding onto @sfdcfox and @DavidReed answers, you could do a direct pull of the list view with: sfdx force:source:retrieve -m ListView:Task.My_Task_List_View -u MyConnectedOrg
Brian Miller's user avatar
  • 5,242
5 votes
Accepted

What happens when I delete the Task related to an EmailMessage?

Note: Some of the following is conclusions my team reached for which we could not find explicit documentation; Salesforce support eventually confirmed our findings, just this past week. The ...
Jason Clark's user avatar
  • 12.2k
5 votes
Accepted

PrePopulate Task with related data even before creating a Task

Triggers are supposed to work that way. They do not pre-populate data on the screens but only update it during the transaction. Out of the box, you will not be able to pre-populate data. If you can ...
Jayant Das's user avatar
  • 30.7k
5 votes
Accepted

"Variable does not exist: Type" when creating a Task

Usually this problem happens when the FLS is not enabled for the user's profile. First thing to check in such cases is to create the record from Salesforce UI to verify if the field is visible.
Raul's user avatar
  • 18.9k
5 votes
Accepted

Query Task.Who.Owner.Email in SOQL

WhoId and WhatId on the Task SObject are polymorphic relationship fields. They can hold an Id (just one Id) from a variety of different SObjects, so the standard way of querying/accessing parent data ...
Derek F's user avatar
  • 64.1k
4 votes
Accepted

How to stop workflow execution when Task Status is set to "Completed"?

You should include status not equal to Completed in the rule criteria. Refer Will the pending actions in the queue ALWAYS trigger? Time-dependent actions remain in the Workflow Queue until ...
Santanu Boral's user avatar
4 votes

Populating Task Subtype field with Call when a task created

Task.TaskSubtype is createable, but not updateable. This means it's amenable to being populated only at the time of the record's creation, without firing an update DML operations. Practically, that ...
David Reed's user avatar
  • 93.7k
4 votes
Accepted

Activities past due dates are still displaying in Next Steps section in LEX

Yes, you'll notice the dates are highlighted in red, which indicates that they are open tasks that are past due. This same behavior happens in Classic as well on places where you can view open tasks (...
sfdcfox's user avatar
  • 502k
4 votes

How to Assign Enter Key to specific Button in vf page

I do not see any JS code on your page which is outlined in the reference you linked to and said you used so I am not sure how much more help this will be since it is essentially restating what was in ...
Eric's user avatar
  • 54.4k
4 votes
Accepted

SOQL Query To Return Any Open Tasks Assigned To a User

You are retrieving information about the related Account but that doe not mean the Owner of the Task matches the Account Name. SELECT Id, AccountId, Account.Name FROM Task WHERE Owner.Name = 'John ...
TSmith's user avatar
  • 5,072
4 votes
Accepted

How to perform field update before a Validation Rule? (without code)

Combining a declarative field update with a validation rule is a creative idea. Some people would go right for code! You're right about it being impossible though, since custom validation rules run ...
Dean M.'s user avatar
  • 96
4 votes
Accepted

Unable to Edit TaskSubtype Picklist Values

TaskSubtype has a number of special behaviors. It dictates how Activities are displayed on the Lightning Activity timeline, in particular. You cannot add picklist values to the field, and you also ...
David Reed's user avatar
  • 93.7k
4 votes
Accepted

how to update lastmodified field whenever any user updated task

You can't write to LastModifiedById. Even if you could, this line Plan.LastModifiedBy.Id = cop.Tasks.OwnerId wouldn't work for a couple of reasons: Changes to a related object (LastModifiedBy) don'...
David Reed's user avatar
  • 93.7k
3 votes

Cannot use ALL ROWS in a SOQL subquery?

If you just want all Task records related to a Case, you can filter on What.Type: List<Task> records = [SELECT WhatId FROM Task WHERE What.Type = 'Case' ALL ROWS]; You can still group them by ...
Adrian Larson's user avatar
  • 151k
3 votes

get all task related to contact in developer console

Additionally you can also use inner or outer join in SOQL to get Tasks based on Contact. Outer join SOQL example: SELECT Id, Subject FROM Task WHERE WhoId IN (SELECT Id FROM Contact) Inner ...
Raul's user avatar
  • 18.9k
3 votes

Related contacts of Account in Task - Lookup filter

Since Contacts are not related to Opportunity that's why no Contact is displaying if you have that look up filter. You should change the look up filter like this upon introducing the Id check for ...
Santanu Boral's user avatar
3 votes
Accepted

Not to create duplicated tasks with same subject in a custom object

What are the criteria for when the Task should be created? Is it possible that you have the Workflow Rule's Evaluation Criteria set to evaluate when the rule is "created, and every time it's edited" ...
Brent Bowers's user avatar
  • 3,192
3 votes
Accepted

Visualforce Controller for Multiple Tasks

Don't share a reference. Incorrect As written, every time you add a "new record", you're just manipulating the same reference to task1. Task task1 = new Task(); public void RDA() { task1.WhatId ...
Adrian Larson's user avatar
  • 151k
3 votes

VF page doesn't show the fields

It seems you're passing the record ID of some other object to the page, not a task. The prefix for a task ID is 00T, you have a02 which leads me to believe you're passing the ID of a custom object ...
Matt Lacey's user avatar
  • 25.8k
3 votes

Recordtype and Pagelayout

Answering your two questions: Is it possible to have the record type in the same page layout of the task? If so, how can i accomplish it? No, by standard way, it first asks for RecordType then ...
Ashwani's user avatar
  • 22.7k
3 votes

WhoId and WhatId is field or related object of activity or task?

"WhoID" refers to people things. So that would be typically a Lead ID or a Contact ID "WhatID" refers to object type things.That would typically be an Account ID or an Opportunity ID You can use ...
Annappa PH's user avatar
  • 2,344
3 votes

Choosing when a Task should recur in Apex: RecurrenceRegeneratedType

The value for making a task recur based on the date it is completed is 'RecurrenceRegenerateAfterToday' In the release notes for Spring '14 it is explained that there are four kinds of recurrence. ...
Nathan Hinchey's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible