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 ...
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 ...
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> ...
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 ...
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 ...
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 ...
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
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(...
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
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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 (...
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 ...
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 ...
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 ...
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 ...
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'...
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 ...
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 ...
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 ...
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" ...
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 ...
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 ...
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 ...
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 ...
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.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
tasks × 586apex × 131
trigger × 69
activities × 63
soql × 47
visualforce × 38
workflow × 34
process-builder × 27
email × 25
event × 25
opportunity × 24
lightning × 21
lightning-experience × 20
visual-workflow × 19
activity × 18
case × 15
reporting × 13
contact × 12
page-layout × 11
data-loader × 11
account × 11
leads × 11
activityhistory × 11
lookup × 10
email-alert × 10