I have a requirement to enable Email tracking for our Salesforce application. The application sends mail using an Html email template and the SingleEmailMessage class, setting the latter's TargetObjectId property to the UserId of recipients. HTML email tracking is enabled for the Account. According to the documentation, it should be possible to use the SaveAsActivity property when using this configuration:
saveAsActivity boolean Optional. The default value is true, meaning
the email is saved as an activity. This argument only applies if the
recipient list is based on targetObjectId or targetObjectIds. If HTML
email tracking is enabled for the organization, you will be able to
track open rates.
However, when the application attempts to send the email with the property set to true, the send fails with status code 121 and the error:
saveAsActivity must be false when sending mail to users.
This error message appears to directly contradict the documentation. I have seen other comments about the SaveAsActivity property on various forums state (without further explanation) that the property must be set to false when sending emails to users.
Please can someone clarify whether or not I should be able to set SaveAsActivity to true when sending an email to a user specified in the TargetObjectId property?
The fix to this turn out to be to populate the TargetObjectId with ContactIds, not UserIds. The SaveAsActivity property can then be set to true without causing an error.
Related
Whenever I assign a case to Queue, the users in that particular queue are not getting email notification, that the cases are allotted to them. I have checked the following:
In the support settings, send email notification when case owner is changed is checked.
In the deliverability, it is set to "All Email"
The user have the read/write permission to that particular record as well
Even after this, nothing seems to be working.
Can anyone help?
Have you checked the Queue's definition?
And if you use assignment rules - in each step you might want to specify the email template.
go to Setup > Process Automation Settings > Enable 'Send an email each time automation updates the same record' set to true
UPDATE: I got passed the error in Pentaho, but I still need help. Specifically, I modified the datatype of the IsActive field in my LDAP Input and Excel Output widgets. Now when I set the value of IsActive to false, Spoon no longer errors; however, in Salesforce the imported account is Active (not what I want). Suggestions?
I'm using Pentaho Spoon to insert data from Active Directory to the user module in Salesforce. I have a "Set field value to a constant" transformation that sets the values of several fields including the "IsActive" field.
I have tried specifying FALSE, false, 0, N for this value, but in each case I get an error like this: "INVALID_TYPE_ON_FIELD_IN_RECORD Error message: Active: value not of required type: false".
If I don't set a value for IsActive, the import works, but the users are added as Active (not what I want). What do I need to do in order to be able to set IsActive to false?
Problem solved. I didn't realize that the admin for the Salesforce account had a script that sets the Active property to true for newly created accounts. Doh.
I have a simple use case that for the life of me I can't seem to figure out:
I have a model "Employee" that is based on the Loopback "User" model. My assumption is that the "id" of "Employee" would be the same as "User".
For the purpose of passing an Employee/User.id to an Angular.js route, I need to expose the Employee model's 'id' property in the RESTful response of the my Loopback API. Any idea on where or how to do this?
So far the Employee.id is profiled with the string "objectid"--which of course is not going to give me the correct user when I perform a Employee.find().
User.id is provided by LoopBack out-of-box. You can test this by adding a dummy user (via a boot script) and then browsing to localhost:3000/explorer to inspect the output of any GET request on the User object.
So, upon a more thorough review of the actual data in the Mongodb database it appears that '_id' in both User and Employee tables were always being populated with "objectid". This made me look at my models more closely. I compared them to the loopback-angular-admin's models--specifically their custom "user" model. What I noticed was that I had '"idInjection": true' on mine whereas the loopback-angular-admin project did not. So, I removed this property and VOILA: BSON/valid ObjectIds!
My models were generated with 'slc loopback:model'. This command line appears to add the '"idInjection":true' property to the models it generates. I don't know why this particular property would be problematic for Mongodb but the source of my original issue has been resolved.
In my form I have a username field that is user for registration. I would like to make this trigger an error message on the field. Something like the error message I would get if I did not enter a value on a field with ng-required.
Can someone tell me how I can make it so that when a user leaves the field then an HTTP request is sent to the database to check for an existing username and then if present an error condition is set for that field.
I am not really looking for specific HTTP request code but just even some pointers would be a big help.
Here's a nice guide on how to check a name field using custom directive and new features from 1.3
We have been trying for a while to solve a Drupal Rules problem.
The situation is;
On every cron run we would like to check for Users who have a certain Role.
We will then send an email to those Users.
But we only want this email to go once.
We are thinking therefore that we will create a new custom/hidden User field called 'email sent'. Then the rule will;
EVENT: On every cron run
CONDITION: Check for Users who have the role AND have a null value in that field
ACTIONS: Send an email to the
users AND set the value of the user 'email sent field to 1.
We think this is possible but we can't see how you can set up a rule to do this.
Any help really appreciated
I think that you can resolve your problem via a custom module where create an action rule that set this fields. In situation like yours I follow this method. Search hook_rules_action_info().
Or if you use profile2 module you can see if there is a rule that can be set this value. I think that there is because Profile2 support Rules.
M.