<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarcrm.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to check if contact&amp;#39;s email address is not empty in process definition?</title><link>https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/6784/how-to-check-if-contact-s-email-address-is-not-empty-in-process-definition</link><description>Hello devs, 
 I have a process definition to send an automated email to the specified contacts if certain conditions are fulfilled. I have been receiving a lot of exceptions in my sugar log regarding the email address missing while attempting to send</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to check if contact's email address is not empty in process definition?</title><link>https://sugarclub.sugarcrm.com/thread/29948?ContentTypeID=1</link><pubDate>Thu, 21 Sep 2023 14:17:15 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:c3f6fc81-ad2a-4b3b-9efc-5fdda14851fa</guid><dc:creator>Luke Ridgway</dc:creator><description>&lt;p&gt;Great to know, thanks &lt;a href="/members/aserrazina"&gt;Andre Serrazina&lt;/a&gt;&amp;nbsp;!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to check if contact's email address is not empty in process definition?</title><link>https://sugarclub.sugarcrm.com/thread/29947?ContentTypeID=1</link><pubDate>Thu, 21 Sep 2023 14:14:50 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:c5776305-eac7-49dc-a1e3-29820c402c6b</guid><dc:creator>Andre Serrazina</dc:creator><description>&lt;p&gt;Hello &lt;a href="/members/luke-ridgway"&gt;Luke Ridgway&lt;/a&gt;&amp;nbsp; and &lt;a href="/members/hatimalam331844"&gt;Hatim Alam&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I am happy you&amp;#39;ve guys sorted this out.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Just wanted to add something here, the ability to&amp;nbsp;use the email_address in the process start event was already raised in the past and it&amp;#39;s documented as the following idea.&amp;nbsp;&lt;br /&gt;&lt;br /&gt; #81938 ( &lt;a href="https://portal.sugarondemand.com/#supp_Bugs/81938"&gt;portal.sugarondemand.com/&lt;/a&gt; )&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;ll link&amp;nbsp;this post to the Idea to raise it&amp;#39;s visibility.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks for sharing your scenarios.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Andr&amp;eacute;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to check if contact's email address is not empty in process definition?</title><link>https://sugarclub.sugarcrm.com/thread/29939?ContentTypeID=1</link><pubDate>Wed, 20 Sep 2023 13:53:27 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:d38db9d0-f9fe-4064-a3cb-b4b63d0946fd</guid><dc:creator>Luke Ridgway</dc:creator><description>&lt;p&gt;&lt;a href="/members/hatimalam331844"&gt;Hatim Alam&lt;/a&gt;&amp;nbsp; - That is great, thank you.&lt;br /&gt;I did struggle with UI in BR - not very clear, but your post above was helpful.&lt;/p&gt;
&lt;p&gt;It worked! &lt;span class="emoticon" data-url="https://sugarclub.sugarcrm.com/cfs-file/__key/system/emoji/1f64c.svg" title="Raised hands"&gt;&amp;#x1f64c;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I am just backtracking through my Process next to make sure I understand it all.&lt;/p&gt;
&lt;p&gt;Thank you so much - I think I can implement BR in some other places now I tink I understand it better.&lt;/p&gt;
&lt;p&gt;Luke.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to check if contact's email address is not empty in process definition?</title><link>https://sugarclub.sugarcrm.com/thread/29935?ContentTypeID=1</link><pubDate>Wed, 20 Sep 2023 11:35:31 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:c79bdc73-2134-4ee7-8e79-704e0b25227f</guid><dc:creator>Hatim Alam</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="/members/luke-ridgway"&gt;Luke Ridgway&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;You can define the field update directly in the &amp;quot;Conclusions&amp;quot; section in Process Business Rule.&lt;/p&gt;
&lt;p&gt;Eg: if email address is not empty, set External Member ID as Email Address.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:375px;max-width:500px;" alt=" " src="/resized-image/__size/1000x750/__key/communityserver-discussions-components-files/54/pastedimage1695209698198v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Documentation:&amp;nbsp;&lt;a href="https://support.sugarcrm.com/documentation/sugar_versions/12.0/sell/administration_guide/sugarbpm/process_business_rules/#Condition_and_Conclusion_Elements"&gt;support.sugarcrm.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to check if contact's email address is not empty in process definition?</title><link>https://sugarclub.sugarcrm.com/thread/29933?ContentTypeID=1</link><pubDate>Wed, 20 Sep 2023 10:49:35 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:1b6441ef-6078-4dc7-a651-17cb029eadba</guid><dc:creator>Luke Ridgway</dc:creator><description>&lt;p&gt;Hopefully you don&amp;#39;t mind me adding a further question on the business rule...&amp;nbsp; I am looking at a very similar situation and found this thread.&lt;/p&gt;
&lt;p&gt;We have a &lt;strong&gt;username&lt;/strong&gt; field on the contact record. (used for&amp;nbsp;customers logging into our website/s)&lt;br /&gt;I want to create a process definition to do the following:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;- When a New Contact record is created&amp;nbsp;&lt;br /&gt;&lt;strong&gt;and&lt;/strong&gt; Email is not empty &lt;br /&gt;&lt;strong&gt;and&lt;/strong&gt; username is empty.&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp; Add Email into Username.&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;But - In the PD start event, &lt;em&gt;Email&lt;/em&gt; (email address) is not available to select?&amp;nbsp; &amp;nbsp;&lt;br /&gt;Do you know how to get to the related email address?&amp;nbsp; (&amp;quot;email1&amp;quot; I believe).&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;So, I then looked at it another way.&lt;/p&gt;
&lt;p&gt;Start Event: New contact created&amp;nbsp;&lt;strong&gt;and&lt;/strong&gt; username is empty.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;gt; Business rule &amp;gt; Email is not empty.&amp;nbsp; Return value = email.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;gt; I then evaluate the BR, &lt;br /&gt;but how after that do I take the value returned from the BR (the email if it was there) and shove that into my username field??? &amp;nbsp; &amp;nbsp;&lt;br /&gt;I cant seem to select it from the BR in the next Action Event (Change field) ?&lt;/p&gt;
&lt;p&gt;Hopefully that makes sense...&amp;nbsp; I added an image below with PD all marked up to help show where I am stuck on adding the email address:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:750px;max-width:1000px;" alt=" " src="/resized-image/__size/2000x1500/__key/communityserver-discussions-components-files/54/ProcessDef.png" /&gt;&lt;/p&gt;
&lt;p&gt;Many thanks&amp;nbsp;&lt;span class="emoticon" data-url="https://sugarclub.sugarcrm.com/cfs-file/__key/system/emoji/1f64f.svg" title="Pray"&gt;&amp;#x1f64f;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;EDIT to add...&amp;nbsp; in a report I can simply traverse:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Contacts &amp;gt; Email Address (module) &amp;gt; Email Address.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to check if contact's email address is not empty in process definition?</title><link>https://sugarclub.sugarcrm.com/thread/29929?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2023 14:01:43 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:fb958ab9-92b2-45d6-8da3-70d00590cbe5</guid><dc:creator>Hatim Alam</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/aserrazina"&gt;Andre Serrazina&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;This is amazing. I didn&amp;#39;t know about it (Business Rules) and&amp;nbsp;it would surely make my CS team happier.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to check if contact's email address is not empty in process definition?</title><link>https://sugarclub.sugarcrm.com/thread/29924?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2023 13:01:30 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:43cb8369-8ae7-435f-adb8-854eb7360715</guid><dc:creator>Andre Serrazina</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a href="/members/hatimalam331844"&gt;Hatim Alam&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the challenging reply.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There is actually another approach that might be better without creating a custom field.&amp;nbsp;&lt;br /&gt;You could create a &lt;a href="https://support.sugarcrm.com/documentation/sugar_versions/12.0/sell/administration_guide/sugarbpm/process_business_rules/#List_View_Record_Actions_Menu"&gt;Business Rule&lt;/a&gt; to evaluate the &lt;a href="https://www.screencast.com/t/yWTCa4Kj"&gt;Email Address of the Contact&lt;/a&gt;&amp;nbsp;and then place it before your &lt;a href="https://www.screencast.com/t/gU2wDcYj9z"&gt;Exclusive Gateway:&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let me know if this one works for you.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Cheers,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Andr&amp;eacute;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to check if contact's email address is not empty in process definition?</title><link>https://sugarclub.sugarcrm.com/thread/29923?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2023 12:13:51 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:12280f08-496c-4b16-a65c-32895065c227</guid><dc:creator>Hatim Alam</dc:creator><description>&lt;p&gt;Thank you &lt;a href="/members/aserrazina"&gt;Andre Serrazina&lt;/a&gt;&amp;nbsp;.&lt;/p&gt;
&lt;p&gt;Is there no OOTB way without creating a custom field? Please let me know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to check if contact's email address is not empty in process definition?</title><link>https://sugarclub.sugarcrm.com/thread/29922?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2023 10:44:10 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:e38aaaa4-71b1-4681-8456-cf968ffcfa5c</guid><dc:creator>Andre Serrazina</dc:creator><description>&lt;p&gt;Hello &lt;a href="/members/hatimalam331844"&gt;Hatim Alam&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To address the situation,&amp;nbsp;you could implement a flag system to indicate whether a Contact possesses an email address.&lt;br /&gt; Here&amp;#39;s a step-by-step approach to achieve this:&lt;/p&gt;
&lt;p&gt;1 - Create a Checkbox Field:&lt;br /&gt;&lt;br /&gt;In Studio,&amp;nbsp;create&amp;nbsp;a calculated checkbox field in the Contacts module named &amp;quot;hasemailaddress_c&amp;quot;&amp;nbsp; with the following formula&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="php"&gt;not(equal(related($email_addresses,&amp;quot;email_address&amp;quot;),&amp;quot;&amp;quot;))&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;2 - Utilize the Checkbox in Your Process Definition:&lt;br /&gt;&lt;br /&gt;After saving the checkbox field, incorporate it within your Process Definition.&lt;br /&gt; Specifically, you can use it in an exclusive gateway to filter out Contacts that do not have an email address.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:375px;max-width:500px;" src="/resized-image/__size/1000x750/__key/communityserver-discussions-components-files/54/pastedimage1695120196783v2.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;Let me know if this helps.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Andr&amp;eacute;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>