Questions tagged [activities]
Questions related to Salesforce.com Tasks/Events.
293
questions
22
votes
2
answers
5k
views
SOQL query to load Task returns nothing, but I see task in UI
I am trying to load all tasks of a contact via SOQL query:
SELECT Id, Subject FROM Task WHERE WhoId = 'contactId'
This query returns only partial list of Tasks. I.e. in UI I see tasks directly ...
10
votes
2
answers
2k
views
Insufficient Privileges when trying to view all Activity History
The Problem
We're experiencing a problem where users are getting an "Insufficient Privileges" message when using an <apex:commandButton> to view Activity History. The users are the Lead owners.
...
10
votes
4
answers
14k
views
Messaging.sendEmail fails with TargetObjectId, WhatId, and SaveAsActivity
I'm trying to send email from Apex using a VF Email Template. The <messaging:emailTemplate> tag in the template specifies recipientType='contact' relatedToType='MyCustomObj__c'.
I'm using code ...
9
votes
1
answer
7k
views
Can you create a Lookup to a Task?
I do not see Task/Activity/Event as an option for a Lookup on my custom Lookup on the Case object. I know Tasks are treated differently than other object but I cannot find any documentation stating ...
9
votes
3
answers
3k
views
Event record type selection is bypassed from Activities list view
I have two Event record types specified.
When I create an Event from the Home tab via the New Event button or when I create an Event directly on a record (e.g., an Opportunity) via the New Event ...
9
votes
1
answer
889
views
SOQL Error Only When Accessing Lead.Address Standard Compound Address Field From WorkFlow Triggered Task Insert
I've added a section of code to our task trigger that retrieves two sets of address fields from the lead or contact the task is being made on - see below-.
private static void ...
7
votes
1
answer
2k
views
How to get list of All Objects enabled with Activities?
Is there anyway we can find all Objects which have Activities enabled, in APEX?
7
votes
1
answer
5k
views
Uploading Activity data to Salesforce
As part of a migration from Siebel to Salesforce, we need to migrate activities. Can you help me complete a list of items we need to take into consideration ? Also, please do add more details to any ...
7
votes
1
answer
3k
views
Why are phone calls "Tasks" and not "Events"?
Is there a reason that the generic Salesforce model makes phone calls "Tasks" and not "Events"? It seems like calls have start times and end times just like Events. What advantage does not having ...
6
votes
2
answers
1k
views
Show html email status under account
Is it possible to show html email status along with activity history related list in accounts? Right now i have to click on the contact then only i can see the html status.
What i have tried:
Adding ...
6
votes
2
answers
7k
views
Using the API, is it possible to get the name of the user who created an activity record?
I have a SOQL query similar to the following:
SELECT Id, ContractNumber FROM Contract,
(SELECT Id, WhoId, WhatId, ActivityDate FROM ActivityHistories)
FROM Contract
Is it possible to get the name of ...
6
votes
3
answers
2k
views
Analytics: how to use Activity (Task / Event) in a Dataset?
I'm setting up Analytics / Salesforce Wave and trying to report on Events.
The use case here is these Event records are used as a mechanism for logging billable hours.
Unfortunately, I can't see any ...
6
votes
2
answers
1k
views
Why are the results returned using a subquery different than when querying Tasks directly?
I am running the code below in a Task trigger. The subquery on Account returns 0 rows, but the direct Task query returns 1 row; there should be 1 row. Can someone explain why this could be happening....
6
votes
1
answer
2k
views
How to enter rich text into tasks and activities?
We use Salesforce to track all our sales communication using Log a call and creating tasks by this. We use shortnames to display the source of communication, f.e. skype for skype chat or fb for ...
5
votes
3
answers
31k
views
How to add fields to "New Event" under "Activity" tab in Lightning?
I am trying to add custom fields to the "New Event" layout under "Activities" on Opportunity:
However, it appears this component is a static, non-customizable component because when I click on it in ...
5
votes
1
answer
1k
views
Is there any reason we shouldn't allow activities on custom object
I'm going to check 'allow activities' on a custom object, but before I do that, are there any considerations I should take into account before doing that?
I couldn't find one of those considerations ...
5
votes
2
answers
2k
views
Insufficient Privileges - Visualforce Page - Occurs as System Admin
UPDATE: RESOLVED! I heard back from Tier 3 support and they acknowledge a bug and said it was due to a user selecting "Feed-Based Layout" on the Create New Layout screen. Be careful with that option ...
5
votes
2
answers
2k
views
Creating a Task and staying on the detail page for that task (not navigating elsewhere)
When you click the New Task or Log A Call button from the Open Activities or Activity History related list on e.g. an Opportunity, you're taken to the regular https://<instance>.salesforce.com/...
5
votes
1
answer
456
views
How to get web-2-lead description text to activity?
Salesforce is very good and consistent in logging all kind of communication with users from lead to paying customer. It is great to see all activities, be they mails, call logs or meeting notes.
...
5
votes
0
answers
2k
views
Display Tasks in Calendar in Lightning Experience for all Users
I would like to see Tasks in my Calendar in Lightning. According to this Idea, this is delivered in Lightning Experience.
I can see that I can do it using the Create a Calendar from Anything feature, ...
4
votes
5
answers
6k
views
Activities on Leads, Opportunities, and Accounts SOQL
I'm trying to get SOQL's for Activities (workbench was no help).
I'm looking at the three prebuilt reports in Salesforce:
Activities on Leads, Activities on Accounts, and Activities on ...
4
votes
1
answer
9k
views
Trigger on Task/Activity - can you access Activity?
I need to have a trigger that updates a date on the contact based on whether a task was created with two specific dispositions (Call_Disposition__c is a custom field on the Activity). Since the field ...
4
votes
1
answer
1k
views
Any reason not to check "Optional Features" when creating custom objects? [duplicate]
When creating custom objects, in the "Optional Features" section I can optionally check boxes for:
Allow Reports
Allow Activities
Track Field History
Allow in Chatter Groups
All these boxes seem ...
4
votes
1
answer
2k
views
How to unarchive activities?
There is a standard behavior of the platform to archive activities if certain conditions are met
Events due more than 365 days ago
Closed tasks due more than 365 days ago
Closed tasks created more ...
4
votes
2
answers
2k
views
Junction Object to create many to many relationship between Tasks and Accounts?
I need to create a many to many relationship between Tasks and Accounts. The goal here is to relate many Accounts to a single Task - and also be able to report on this cleanly - ex: "User(assignedTo) ...
4
votes
1
answer
2k
views
How can I filter activities by record type?
Issue
How can I filter the ActivityHistories sub-query by record type? When I use record type in the query it's saying the field isn't valid.
Background
I'm doing a custom last activity date for a ...
4
votes
1
answer
64
views
Can Email to Salesforce leverage Shared Activities?
I noticed that I can leverage Shared Activities on outbound emails from Salesforce, but it seems like Email to Salesforce doesn't seem to support it. Was curious if anyone had a good workaround on ...
4
votes
3
answers
2k
views
JourneyBuilder Update Contact activity
I am attempting to update a contact record using the Update Contact activity in Journey Builder. The attribute I wish to update is a date field. Is it possible to update with the current date?
The UI ...
4
votes
1
answer
2k
views
Unable to edit Public Calendar Event
One of the user is not able to edit some of the public calendar events.
Here is the error message when the user is trying to edit the event.
Insufficient Privileges You do not have the level ...
4
votes
3
answers
25k
views
Missing New Task and Log a Call button in Lightning
I found that New Task, Log a Call buttons are missing from the activity in Lightning experience. I did added them to Mobile and Lightning Experience Actions section of the page layout. And also we ...
3
votes
1
answer
1k
views
Rename standard field on Task
How to rename Call Result standard field on Task object.I don't see this field under Rename tabs and fields -> Tasks or Rename tabs and fields -->Activities.
3
votes
1
answer
6k
views
setsaveasActivity
I am trying to send an email to Order Contact and Order Owner and saving it as Completed Task(Activity History) against Order but Sent Email is saved against Contact's Activity History.How to save it ...
3
votes
1
answer
1k
views
Counting Activities (Open/Closed Tasks and Open/Closed Events) Compile Error: expecting a colon, found 'system.now'
Issue:
Below is a part of my class for updating Activity Count fields. I want to only select the id's from closed Tasks and also closed Events. I have no clue why my two lists below give me the "...
3
votes
2
answers
2k
views
Sharing Activities Programmatically
Can Activities be shared programmatically? They don't seem to have a share object associated to them? Can programmatic sharing of Activities be achieved without a Share object?
3
votes
1
answer
4k
views
Lookup Field on Custom Object related to Activity (Task) (aka create a related list on Activities/Tasks)
This question seems to have been also asked here: Tasks and events custom related list with no resolution.
I have the ZenKraft Shipmate UPS package installed in my organization, and I'm looking to ...
3
votes
1
answer
2k
views
Auto-populate custom Activity/Task field with Contact field value
I'm just getting my feet wet in regards to Salesforce in general, but specifically with Apex programming (still an undergraduate student). We added some custom fields to the Activities object that ...
3
votes
2
answers
402
views
Is it possible within a formula field to test whether a Lead has open activities?
I am writing "Priority Score" formula field to help our reps prioritize leads, which outputs a number. If a lead has no open activities I want to give it a higher score; is it possible to evaluate ...
3
votes
1
answer
3k
views
Is it possible to create a flow that creates an opportunity and an event from the account screen?
I am building out a new SFDC org for my new company and i want to use flows to try to cut down on my users using multiple objects, i have tried this in the past but a few years back in a different ...
3
votes
2
answers
2k
views
Send an Email from Task: Why does the To field picklist sometimes show up?
When I click "Send an Email" from an Activity History Related List from a custom object record, sometimes a picklist appears next to the "To" lookup field. Why does it appear when I select some ...
3
votes
1
answer
7k
views
What are the SOQL queries for the actvityHistory and OpenActivity Related lists?
Does anyone know what soql queries you would run on Task and Event equivalent to what salesforce uses to generate the Activity History and Open Activities related lists.
The OpenActivity and ...
3
votes
1
answer
65
views
How to distinguish activity on an account?
We have 2 workflows that collide:
Sales team are looking for neglected accounts, based on "Last Activity" < last 6 months.
Marketing team are sending mass emails through campaigns etc, to the same ...
3
votes
1
answer
1k
views
How to retrieve global value set values assigned to Task recordtype through metadata API
How do I, through the metadata, retrieve the picklistvalues assigned to a task recordtype, when the picklist is a global value set?
I've tried with the following package.xml, however neither the ...
3
votes
1
answer
564
views
Is it possible to add custom header for validate/save/publish/execute callouts of the custom activity?
The question is how to enforce journey builder to send callouts with custom header? I have to add custom header to each request(save, validate, publish and execute), that will be sent from the ...
2
votes
2
answers
3k
views
How to get list of Contacts which have at least 1 Event in APEX SOQL?
How can I get a list of Contacts which ahve at least 1 Event created for them in a specified time period?
select Id, Name from Contact where ID IN (Select WhoID from Event where ActivityDate >= ...
2
votes
2
answers
752
views
Why do Queries on Tasks not return records when multi-connect is enabled?
I have a visualforce page and controller in a development org with multi-connect to tasks (shared activities) enabled. If I query a task with multiple connected contacts through that page it returns 0 ...
2
votes
1
answer
152
views
What are the objects/entities that are NOT allowed in an inner join SOQL query?
I've tried to do an inner join SOQL query using Events/Tasks:
SELECT Id FROM Attachment WHERE ParentId IN (SELECT Id FROM Event) LIMIT 1000
But I failed with the error:
"Entity 'Event' is not ...
2
votes
1
answer
2k
views
How to deal with Activities in a Case Hierarchy?
Let's consider a Case in the service sense of the word - a caller calls up with a situation ("My printer's broken."). Now, maybe the caller calls up about more than one situation ("My ...
2
votes
1
answer
6k
views
Remove or Hide New task/New Event button from Activity List View
I need to remove or hide New task/New Event button from the standard Activity List View. I want to show users the list view but do not want any user to create a Task/Event from that view.
Is there any ...
2
votes
1
answer
417
views
Do not see Event object in Dataloader
I need to move events from one SF instance to another, but when I open Data Loader I don't see Even (and Event Relation) object in the list of available options. I login under user with System ...
2
votes
1
answer
267
views
Best Practice - Update LastModifiedDate (Cross Object)
I have a business requirement to change LastModifiedDate on an Opportunity record whenever an Activity is logged against it.
I can do it in two ways:
when an activity is logged, i can simply do an ...