<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/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 get current URL in Email message context</title><link>https://www.aras.com/community/f/development/36602/how-to-get-current-url-in-email-message-context</link><description>Hello, 
 In email message, I would like to push for user an Shortcut of Linked ITEM. Like that it will be easier for user to Access to ITEM. 
 I know how to get ID if ITEM : I0215_CMEcu:xxxxxx 
 
 But how to get current URL in Email message context ?</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: how to get current URL in Email message context</title><link>https://www.aras.com/community/thread/9523?ContentTypeID=1</link><pubDate>Wed, 07 Jun 2023 07:27:34 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:0300ec9f-4f6e-4a2f-a741-0856b2564b1f</guid><dc:creator>Troy R</dc:creator><description>&lt;p&gt;For anyone who comes across this thread in the future.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve been including URLs in emails that go directly to the item in PLM by the following means:&lt;br /&gt;&amp;lt;a href=&amp;#39;REPLACEWITHPLMDOMAIN/ ECO:${Item[2]/id} &amp;#39;&amp;gt;&lt;br /&gt;&lt;br /&gt;This uses the id from the 2nd query string I have for the item itself:&lt;br /&gt;&lt;br /&gt;&amp;lt;Item type=&amp;quot;Activity&amp;quot; id=&amp;quot;${Item/ActivityId}&amp;quot; action=&amp;quot;get&amp;quot; select=&amp;quot;name,message&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;Item type=&amp;quot;${Item/@type}&amp;quot; id=&amp;quot;${Item/@id}&amp;quot; action=&amp;quot;get&amp;quot; select=&amp;quot;item_number,title,classification&amp;quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;Feel free to replace &amp;quot;Express ECO&amp;quot; with any other ItemType you want your URL to direct to.&lt;br /&gt;You can get an idea of how the URL should look for your item by using the &amp;quot;Copy Link&amp;quot; action for that item to see the URL structure.&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;&lt;br /&gt;Troy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to get current URL in Email message context</title><link>https://www.aras.com/community/thread/8543?ContentTypeID=1</link><pubDate>Fri, 15 Jul 2022 17:17:45 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:13908479-80ca-4a6f-a8ac-9edd68dfe7f1</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Hi community,&lt;/p&gt;
&lt;p&gt;I wonder if anyone in the meanwhile found a &amp;quot;perfect&amp;quot; solution for relative URLs in Email Message items?&amp;nbsp;The ideas mentioned in this thread all help to improve the situation. But maybe there are other options that we don&amp;acute;t know yet?&lt;/p&gt;
&lt;p&gt;@Gopi: Your variant is great for Methods! For JS even a simpler solution is available: var url = aras.getInnovatorUrl();&amp;nbsp;&lt;span class="emoticon" data-url="https://www.aras.com/community/cfs-file/__key/system/emoji/1f603.svg" title="Smiley"&gt;&amp;#x1f603;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;But is it possible to use the Method or any kind of code in Email Messages?&lt;/p&gt;
&lt;p&gt;I tried to find something helpful in the codetree, but it seems that emailing is part of the core itself. Best solution would be some additional Variable, just like $[USER] or&amp;nbsp;$[ALIAS].&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to get current URL in Email message context</title><link>https://www.aras.com/community/thread/7020?ContentTypeID=1</link><pubDate>Fri, 02 Jul 2021 06:08:46 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:ffac21c7-7d50-4d64-b09b-9fa31ed931d3</guid><dc:creator>Francois Breton</dc:creator><description>&lt;p&gt;Hello, Thanks a lot.&lt;br /&gt;I will test it..when I will have some time.&lt;br /&gt;But this is a good proposal !&lt;/p&gt;
&lt;p&gt;FB&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to get current URL in Email message context</title><link>https://www.aras.com/community/thread/6969?ContentTypeID=1</link><pubDate>Fri, 25 Jun 2021 13:14:09 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:df876930-6e64-4f00-b612-c17e58f3399f</guid><dc:creator>Nathan H.</dc:creator><description>&lt;p&gt;Breton,&lt;/p&gt;
&lt;p&gt;Good day.&amp;nbsp; This is how I have my EMail Message notifications set up.&amp;nbsp; It provides a link to the task for a change.&amp;nbsp; I have these assigned to the Activity Template &amp;gt; Notifications on the Workflow.&amp;nbsp; I set the event to On Activate and Target All Assigned.&amp;nbsp; I designed the e-mail to be generic so I could assign them to any of the Activities without having to change the notification.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span style="font-family:Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:12px;"&gt;Subject&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;span style="font-family:Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:12px;"&gt;ARAS - ${Item[2]/sm_weapon_system_name} - ${Item[3]/label}: ${Item[@type="Activity"]/name} -&amp;nbsp; ${Item[2]/item_number} - ${Item[2]/title}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span style="font-family:Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:12px;"&gt;Body HTML&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&amp;lt;body&amp;gt;&amp;lt;font-size=&amp;rdquo;+1&amp;rdquo;&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;A ${Item[3]/label} is ready for review. Please log in to ARAS and navigate to My Innovator/My InBasket to take the appropriate actions.&amp;lt;/p&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;${Item[3]/label}: &amp;lt;a href=eide-aras.myngc.com/.../default.aspx&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;lt;b&amp;gt;Due Date: &amp;lt;/b&amp;gt;${Item[2]/due_date}&amp;lt;br/&amp;gt;&lt;br /&gt;&amp;lt;b&amp;gt;Assigned To: &amp;lt;/b&amp;gt;${Item[2]/drafter}&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;b&amp;gt;Affected Item: &amp;lt;/b&amp;gt;${Item[2]/affected_item}&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;b&amp;gt;Title: &amp;lt;/b&amp;gt;${Item[2]/title}&amp;lt;br/&amp;gt;&lt;br /&gt;&amp;lt;b&amp;gt;Change Description: &amp;lt;/b&amp;gt;${Item[2]/description}&amp;lt;/p&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Activity: &amp;lt;/b&amp;gt;${Item[@type="Activity"]/name}&amp;lt;br/&amp;gt;&lt;br /&gt;&amp;lt;b&amp;gt;Instructions: &amp;lt;/b&amp;gt;${Item[@type="Activity"]/message}&amp;lt;/p&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;p&amp;gt;&amp;lt;a href=&amp;quot;&lt;a href="https://eide-aras.myngc.com/cm/default.aspx?StartItem=inbasket"&gt;&amp;quot;&amp;gt;eide-aras.myngc.com/.../default.aspx&lt;/a&gt; InBasket Link&amp;lt;/b&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;If any assistance is required, please contact the SMORS CM Team.&amp;lt;br&amp;gt;&lt;br /&gt;- smorscm@ngc.com&amp;lt;br&amp;gt;&lt;br /&gt;- &amp;lt;a href=&amp;quot;&lt;a href="https://eide.myngc.com/sites/SMORSNet/CM/SitePages/Home.aspx?authToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InpJMHBLbkwxNWJqak4zanhUbUluclM2a3BnayJ9.eyJhdWQiOiJ1cm46QXBwUHJveHk6Y29tIiwiaXNzIjoiaHR0cDovL25nYy11c2VjcC5teW5nYy5jb20vYWRmcy9zZXJ2aWNlcy90cnVzdCIsImlhdCI6MTU5OTc3MDY1OSwiZXhwIjoxNTk5Nzk5NDU5LCJyZWx5aW5ncGFydHl0cnVzdGlkIjoiOTE3ZTdmOTctZjkxZS1lNzExLTgwZGEtZTBkYjU1MDE4NjM5IiwidXBuIjoiTTY1MzM1QG5nZmVkdXMubmdleHQuY29tIiwiY2xpZW50cmVxaWQiOiI5MTU3NTEwMC00OTE2LTQ3ZDgtMWQwMy0wMDgwMGEwMDAwZGMiLCJhdXRobWV0aG9kIjoiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2F1dGhlbnRpY2F0aW9ubWV0aG9kL3dpbmRvd3MiLCJhdXRoX3RpbWUiOiIyMDIwLTA5LTEwVDE5OjUzOjQ1LjM2MVoiLCJ2ZXIiOiIxLjAifQ.kbWE3xq57e5NP0H0LobUGR51KkpPVuw2GT6pqodPP_J4DLoy5t5Spi_AsD1Z1Cww7ZHwGAgFWMRvSGIh7Dnha9-e8ztASaAAwzPO-5U8jRGaGl9XOTGinEeWqsfDOEDNYL17YALVdBO-AyyD-LYkryvmor7dzlqKiStqI98Kas1tyXDndq5Zub2Tocvae9-f00fTh0LkFHte8zZpPaUuO6oJGjinOHBSk5rF3HyqyAFC2Yrzb_RQl0vgTcIU6s11N4v07WpVVgeOsDvcLV_lvoqnvG9bT98T9Wo-gDejFVywBC7iI2OKFHmfFG0Z_CGnKDH1e_bgdP9b69eskvzzTg&amp;amp;client-request-id=91575100-4916-47d8-1d03-00800a0000dc"&gt;&amp;quot;&amp;gt;eide.myngc.com/.../Home.aspx&lt;/a&gt; CM Page&amp;lt;a&amp;gt;&amp;lt;/p&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Thank you!&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span style="font-family:Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:12px;"&gt;Query String&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span style="font-family:Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size:12px;"&gt;&amp;lt;Item type=&amp;quot;Activity&amp;quot; id=&amp;quot;${Item/ActivityId}&amp;quot; action=&amp;quot;get&amp;quot; select=&amp;quot;name,message&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;Item type=&amp;quot;${Item/@type}&amp;quot; id=&amp;quot;${Item/@id}&amp;quot; action=&amp;quot;get&amp;quot; select=&amp;quot;item_number,title,due_date,drafter,classification,sm_weapon_system_name,description&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;Item type=&amp;quot;ItemType&amp;quot; id=&amp;quot;${Item/@typeId}&amp;quot; action=&amp;quot;get&amp;quot; select=&amp;quot;label,name&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to get current URL in Email message context</title><link>https://www.aras.com/community/thread/6918?ContentTypeID=1</link><pubDate>Mon, 21 Jun 2021 06:55:28 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:481dd18a-49f2-4a54-b897-0a35a59f9fdd</guid><dc:creator>Francois Breton</dc:creator><description>&lt;p&gt;Hello, thanks a lot. :-)&lt;/p&gt;
&lt;p&gt;I &amp;#39;m going to check it today.&lt;br /&gt;FB&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to get current URL in Email message context</title><link>https://www.aras.com/community/thread/6914?ContentTypeID=1</link><pubDate>Sun, 20 Jun 2021 06:36:43 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:086bdc4d-c0d5-48c6-937f-5bcebc6ba9a9</guid><dc:creator>Gopikrishnan</dc:creator><description>&lt;p&gt;Hi Breton&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t find an easier way to get the URL of an item but you can use the below steps as workaround. You can create a generic method that create the URL and return to your method&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1: Create a Server Side (C#) Method&amp;nbsp; and copy below code - Method Name : generateURL&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Innovator inn = this.getInnovator();&lt;/em&gt;&lt;br /&gt;&lt;em&gt;string itemType = this.getProperty(&amp;quot;itemType&amp;quot;);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;string itemId = this.getProperty(&amp;quot;itemId&amp;quot;);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;string protocol = HttpContext.Current.Request.Url.Scheme;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;string hostName = HttpContext.Current.Request.Url.Host;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;string dbName = HttpContext.Current.Request.Url.Segments[1];&lt;/em&gt;&lt;br /&gt;&lt;em&gt;Item outputUrl = inn.newItem(&amp;quot;&amp;quot;);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;outputUrl.setProperty(&amp;quot;itemurl&amp;quot;, protocol + &amp;quot;://&amp;quot; + hostName + &amp;quot;/&amp;quot; + dbName + &amp;quot;?StartItem=&amp;quot; + itemType + &amp;quot;:&amp;quot;+itemId);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;return outputUrl;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you want URL of an item in Client Method (Javascript) then use below lines in your method&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;var getURL = innovator.newItem(&amp;quot;Method&amp;quot;,&amp;quot;generateURL&amp;quot;);&lt;br /&gt;getURL.setProperty(&amp;quot;itemType&amp;quot;, parent.thisItem.getType());&lt;br /&gt;getURL.setProperty(&amp;quot;itemId&amp;quot;,parent.thisItem.getID());&lt;br /&gt;getURL = getURL.apply();&lt;br /&gt;var itemURL = getURL.getProperty(&amp;quot;itemurl&amp;quot;);&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you want URL of an item in Server Method (C#) then use below lines in your method&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Item getURL = this.getInnovator().newItem(&amp;quot;Method&amp;quot;,&amp;quot;generateURL&amp;quot;);&lt;br /&gt;getURL.setProperty(&amp;quot;itemType&amp;quot;, this.getType());&lt;br /&gt;getURL.setProperty(&amp;quot;itemId&amp;quot;, this.getID());&lt;br /&gt;getURL = getURL.apply();&lt;br /&gt;string itemURL = getURL.getProperty(&amp;quot;itemurl&amp;quot;);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank You&lt;/p&gt;
&lt;p&gt;Gopikrishnan R&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>