<?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>Validation</title><link>https://www.aras.com/community/f/development/3559/validation</link><description>Hello,

I have written method to validate the length of Item_id to 20.
But there is error while attaching this method to Itemtype.Whwre should I attached this method on client event,server event,action or form events??

 var inno = this.getInnovator(</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Validation</title><link>https://www.aras.com/community/thread/1287?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2018 11:40:08 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:0d1e7684-eac0-4eac-821f-197cb404ef43</guid><dc:creator>Christopher Gillis</dc:creator><description>Hi Angela,

Server Events will only accept Methods that are written in C# or VB. There is a dropdown on the Method form that will allow you to change your Method from JavaScript to C#. You may also need to update the code to compile in C#.

After saving your method as C#, you should be able to attach it to a Server Event without issue.

Chris

________________________________

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Validation</title><link>https://www.aras.com/community/thread/1284?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2018 11:36:41 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:16b86017-01c4-4620-9cac-8dbba7b93db1</guid><dc:creator>Tejaswini</dc:creator><description>Hello,
I tried but there is error called &amp;quot;The Method tyep javascript not currently supported&amp;quot;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Validation</title><link>https://www.aras.com/community/thread/1283?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2018 09:54:26 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:c857f6c0-152a-40ab-a570-f955aeabf866</guid><dc:creator>Christopher Gillis</dc:creator><description>Hi Angela,

I think it makes the most sense to attach this Method to onBeforeAdd and onBeforeUpdate Server Events to ensure that no matter how the item gets added, this check for the length of the &lt;strong&gt;item_id&lt;/strong&gt; is performed.

Additionally, this kind of check can also be accomplished by specifying a Pattern for the item_id property. You can find more information about Patterns on the &amp;quot;Entering ItemType Properties&amp;quot; of the Just Ask Innovator help page. For string properties, you can specify a regular expression to match the string by. In your case, you could use a regular expression like &lt;strong&gt;[a-zA-Z0-9]{20}&lt;/strong&gt; which will verify that the string is exactly 20 characters and contains only alphanumeric characters.

Chris

___________________________________

Christopher Gillis

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