Create Email with a workflow in MS Dynamics Crm 2011 and dynamically fill the "To" field - email

I'm working on Ms Dynamics Crm 2011 development and I encountered following problem.
My situation:
I want to be able to automatically send an Email after a change on a specific status field on a record of the Entity "MyEntity". "MyEntity" has an Email-field. I try to create a workflow which sends an Email to the Email-field address of the "MyEntity" record after the status has been changed. My problem is that I can't add in the Email Creation workflow to the "To" field this "MyEntity" Email-field adress. I need to somehow specify in the workflow to dynamically add the "To" field, the relating Email address from the specific "MyEntity". Is that possible? Is there a workaround for that? It could be done with a plugin I guess, but by now I'm trying to avoid the plugin solution.
Thanks in advance
John

Yes, you should be able to. First go to Solutions, bring up your entity, go to Fields, bring up your e-mail field and ensure the Format is e-mail. Publish.
Work around: If you have more than 1 e-mail Format text field, change the others temporarily (to text from e-mail) and Publish. Otherwise, the next step is ambiguous and we don't have control over which field CRM sets up as the email to use when this entity is used for e-mail.
In the solution frame, select your entity node in the tree. Under Communication and Collaboration, check the box 'Sending e-mail (If an e-mail field does not exist, one will be created).' Save/Publish.
Fix the work around above if you had more than 1 e-mail format text field. Change them back to e-mail. Publish.
In Workflow, select your To Field. Under the Send e-mail step, select 'Set Properties.' Select the 'To' field. In the form assistant you should not be able to select your entity. NOTE: You will bind to the 'Key' field and NOT to the particular e-mail field.
This only works for a single e-mail field on your custom entity. There is no way to use a text field as an address in a CRM 'to' field.

Unfortunately you cannot.
Out of the box the To field in an email accepts only
Account
Contact
Facility/Equipment
Lead
Queue
User
So in order to achieve the goal , you will have to write a custom workflow activity (optional : taking the custom text field in your input parameter )and refer it in your workflow or develop a plug-in.
Sample code for Plugin:
SendEmailRequest req = new SendEmailRequest();
req.EmailId = emailId;//ID of created mail
req.TrackingToken = "";
req.IssueSend = true;
For more information check this post Crm 2011 :Workflow - Sending email problem

Related

How to Add Followers Into The Recipient Field of an Email in Odoo?

I'm currently using Odoo 12.0+e-20181025 and I'm trying to add the followers of each ticket made in helpdesk into an automated email whenever it has been changed (not only in stage). So far I've tried some codes and managed to put the followers' emails into the body of the text, but in the recipient field.
Here is the code I used:
% for follower in object.message_follower_ids:${follower.email_formatted}%endfor
I can use it in the body text but I can't produce any result in the Email To field. Any help is greatly appreciated.
You could use ${str(object.message_partner_ids.ids).replace('[', '').replace(']', '')} in "To (Partners)" field.

Setting the 'query field' on an InfoPath Data Connection

I'm trying to follow some instructions with the first line:
1) Set the "query field" (Account Name in getUserProfileByName Secondary Recieve data source) to the Account Id of field selected in People Picker.
From here. But when I go try and edit queryfields it's greyed out? Ultimately I'm trying to populate fields when a user selects a user from a People Picker. Any help appreciated.
I'm using InfoPath 2013.
To autocomplete this you'll have to use a support or population-related field, with a new action rule. This is due to people picker fields not allowing any action rules applied to them.
Condition:
Use the condition DisplayName is not blank by using "Select a field or group..." in advanced view and selecting your people pickers field
Actions:
Set a field's value
Field: data connection queryFields DisplayName of people picker
Value: your forms DisplayName of people picker
Query using a data connection: getUserProfileByName / User Information List
Set a field's value
Field: your forms Department field
Value: data fields > Department of your data connection
Please note: getUserProfileByName / User Profile Service Data Connection no longer works in SharePoint Online and results in an error 5566. Please use a SharePoint list data connection to the hidden User Information List on the stem of your SharePoint site instead. It provides you with most of the same fields you'd find in getUserProfileByName, see below:
Name
Account
Work_email
Mobile_phone
About_me
SIP_Address
Is_Site_Admin
Deleted
Hidden
Picture
Department
Title
First_name
Last_name
Work_phone
User_name
Web_site
Ask_Me_About
Office
Picture_Timestamp
Picture_Placeholder_State
Picture_Exchange_Sync_State
Hope that helps!

Workflow to change order status if a custom field is populated for Sales Orders in NetSuite

Basically I want the orders to import under Pending Fulfillment only when the selected triggering client field has a value in it (any value). If it is blank I don't want this workflow to run on that SO. I have another workflow in place that affects other orders that are imported through Web Services, so this will be just for specific orders when the Triggering Client Field has a value. I set it up, as you can see in the images attached and no luck!
Parameters: Order Status=Pending Fulfillment (Static value)
Trigger on: After Field Sourcing
Contexts: Web Services
Triggering Client Fields: Custom free form text field that will be
populated with a 4-5 digit number
This looks like it will only work within the UI when someone is entering a sales order - and actually it won't work at all because if that's a free form text field, then it won't trigger the "After Field Sourcing" event. I would make the trigger Before Record Submit, or After Record Submit instead, and then under the "Condition" section, use the visual builder to tell set the criteria to only when Handshake Order ID is not empty. That should do the trick for you.
Please change your workflow action as below
Workflow Action : Import Status
Trigger On : Entry
Condition : {custbody11} is not null

Generate email once order is changed to filled in netsuite

Once someone clicks on the fulfill button on the Sales Order I want it to send an email to someone.How can make this occur in Netsuite?
You can create a custom workflow on sales order and configure the worflow to send email to the specific email id. The email id can be either custom one / a field value from the sales order record (ex. customer, salesperson etc.,)
The condition for the workflow will be
OldRecord.Status!="Pending Fulfillment" && NewRecord.Status!="Pending Fulfillment"
Thanks
Frederick D
you can write a user event on Item Fulfillment record type and send email using nlapiSendEmail()
You may want to put a check in script if type == 'create' to avoid sending email on other record operation.

SugarCRM related Field

I have sugarCRM 6.5.20 OnDemand. I am in the Studio. I have a 1:1 relationship from Leads to Leads. I am trying to get the Primary Email address of the related Lead and display it in a calculated field.
It seems like the calculated field formula should look like:
related($emails,"email1")
When I do that I get the following error:
Invalid formula: related: Unknown Field : email1
The dropdown list doesn't list the email at all. How can I get the email? All of my web searches have proven ineffective.
Update:
I am willing to make the calculated field be the primary email address of the current lead. To do that I found 2 variables named $email_addresses and $email_addresses_primary and $emails. There is also a function called valueAt.
I tried to use valueAt(1,$emails) and valueAt(1,$email_addresses)
The validator accepted the syntax but the value was always empty.
Can I make a calculated field off of the leads primary email?
You won't get the Email field for the Studio's formula calculation. Email field is stored in a separate table and not in the module's table. It is just put in the Layout along with the other fields of the module, but it is not the same as other fields. All the Email Addresses irrespective of the modules are stored together in the email_addresses table and are related to respective module records in the email_addr_bean_rel.