<?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>Server events</title><link>https://www.aras.com/community/f/development/3459/server-events</link><description>If there a way to check inside a server side method which server event called the method?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Server events</title><link>https://www.aras.com/community/thread/1001?ContentTypeID=1</link><pubDate>Mon, 13 Nov 2017 09:04:53 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:165f8c27-b44e-40ff-a0c0-b91a19c1ffde</guid><dc:creator>Former Member</dc:creator><description>I have figured out another solutions, thanks for the help.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Server events</title><link>https://www.aras.com/community/thread/999?ContentTypeID=1</link><pubDate>Fri, 10 Nov 2017 11:39:13 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:a1d97118-b40a-43c6-9bfd-a529a5251280</guid><dc:creator>Christopher Gillis</dc:creator><description>Hello,

Could you please further elaborate on your use case?

Which two server events do you need to distinguish between?

Chris

__________________________________

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Server events</title><link>https://www.aras.com/community/thread/993?ContentTypeID=1</link><pubDate>Thu, 09 Nov 2017 13:19:59 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:01f59643-9e95-45c8-9734-8466a55d16e3</guid><dc:creator>Former Member</dc:creator><description>A couple ways to check is by the &amp;quot;event&amp;quot; of the method...(beforeUpdate, beforeAdd, afterPromote, etc).  There is an order of operation, i believe, as to what events get fired off first.  If they are both the same event then you can look at the sort order.  The execution of methods, as i understand it, goes in order per type.  so lowest &amp;quot;sort order&amp;quot; goes first for each event

example:

onBeforeAdd_Method_1 - sort order 10 goes first

onBeforeAdd_Method_1 - sort order 20 goes second etc...

or, if you are able to, enable debugging and put a break point in each method.  see what gets hit first.

does this help?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Server events</title><link>https://www.aras.com/community/thread/990?ContentTypeID=1</link><pubDate>Thu, 09 Nov 2017 08:26:27 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:f3a1d925-2610-46c4-b532-d284ce49405e</guid><dc:creator>Former Member</dc:creator><description>I have a snippet of code that exists in a methods that is attached to two server events but only want to run it in one.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Server events</title><link>https://www.aras.com/community/thread/991?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2017 16:15:05 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:416c2c0a-4fcb-4bbe-aabb-5b2ed7659a2a</guid><dc:creator>Christopher Gillis</dc:creator><description>Hello,

Could you please clarify your use case for retrieving the name of the server event within the method itself?

While it&amp;#39;s not easily possible to directly get the name of the server event, it may be possible to infer which server event is currently running based on the information in the context item of the method.

Chris

______________________________________

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>