Questions tagged [whatid]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
209 views

Field Event.WhatId does not exist. Excuse me?

Using SOQL I can see that there is a field called WhatId for the Event object. But if I want to use this field in a URL hack, I get the error 'Field Event.WhatId does not exist'. I googled a but, so ...
0
votes
2answers
233 views

Referencing WhatID in tasks?

I have a lookup on Teams called Managers (User Lookup). When a task related to Teams is completed, I want to update a field on tasks called match and also update a field on Teams called completed ...
0
votes
2answers
259 views

How Can I Reparent a Task Associated with a ListEmail Using Apex?

We are trying to move a task from one contact to another in a trigger. The Task is created by ListEmail functionality. We are getting an exception when re-assigning the WhoId. Exception: Update ...
0
votes
1answer
384 views

Merge field not populating

This is my code to send an email in apex. I have created a text Email Template where i need to use first name from contact. How ever the {!Contact.firstname} field is not populating.When i press "send ...
-2
votes
1answer
139 views

WhoID and WhatID

what is diffrence between whoid and whatid in salesforce? I tried reading the diffrence from sources and could not understand. PLease help me in understanding. Thanks in advance
1
vote
1answer
344 views

SingleEmailMessage limit

Below links says we can send up to 100 recipients for the To field in Salesforce. https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/...
0
votes
1answer
2k views

Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION [WhatId]

Hoping someone can help me out. I'm a bit new here. Error message and Apex class provided below. I have a trigger that fires after a user creates a new note in Notes & Attachment resulting in a ...
4
votes
1answer
419 views

Lightning Opencti savelog does not update WhoId on Task

In Lightning Winter'17 Org, with OpenCti API 38 and Integration API 38, when I call from the developer console the sforce.opencti.saveLog({Value:{entityApiName:'Task',Id:'00Txxxxxxxxxxxx',WhatId:'...
0
votes
1answer
480 views

Set WhatId in Task before insert (or update eventually) trigger

We have an APP that create tasks. Some of them should be related to accounts. Sometime the whatid is null so the task is linked to nothing. We have a custom field in task object that contains ...
3
votes
1answer
1k views

Apex - Task.What.Type

Need a little help. I can't figure out the correct syntax to utilize Task What.Type in my trigger. Can someone tell me what I am doing wrong? trigger ININRelatedToFix on Task (after Insert, after ...
2
votes
1answer
3k views

How to relate WhatID field of Task object with custom object

hi I am learning Salesforce. I have created trigger for my custom object. I have an error the following type: Error: Compile Error: No such column 'Theme__c' on entity 'Task'. If you are ...
1
vote
1answer
1k views

How to avoid FIELD_INTEGRITY_EXCEPTION, Related To ID

I'm Having problem with Passing WhatId while sending emails in apex class which invoked in process builder. The process builder is invoked apex class is: public class TrainingExpiring30Days { @...
4
votes
1answer
1k views

Use fields from WhatID object in Email Template

I have apex code that sends out emails using templates. The code sets the RelatedTo id as a contact, and the WhatID as a custom object which is a child of contact. Sometimes the child object is a ...
4
votes
1answer
1k views

Email not being send if whatID is set and setSaveAsActivity is true

I have the following code if (this.templateId != null) { // parameters specific for visualforce template singleEmailMessage.setTargetObjectId(this.targetObjectId); ...
4
votes
2answers
767 views

Null Pointer Exception add AccountId to WhatId for Task

Trying to build what I thought would be a simple trigger: when a task is created that is only related to a contact (WhoId = contact type, but WhatId = null), relate the task's WhatId to the contact's ...
3
votes
2answers
403 views

WhatID null for Activity Tasks created from bcc to salesforce

When our users leverage the email-to-saleforce feature that allows them to bcc emails to salesforce, those emails are added as Tasks of type 'Email' in the Activity History related list for relevant ...
1
vote
2answers
2k views

Updating WhatId on Activity when Opportunity is Created

Here's something that I'm trying to do which I feel as though I've made it 75% of the way through. Right now let's assume I have the ability to generate an opportunity when a certain action is ...
2
votes
2answers
2k views

SingleEmailMessage SetWhatId with Quote Id

I am currently recreating much of the OOB Quote functionality in Apex and I am almost complete. Now there is just one other hurdle, the Email Quote functionality. Now, it doesn't seem like an issue......
0
votes
1answer
456 views

Problem setting WhatId with a custom object ID

I have the following error : Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION ... [WhatID] When I'm trying to create an Event setting the WhatId field with a ...