<?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/"><channel><title>Jacky Phan さんのアクティビティ</title><link>https://www.aras.com/community/members/quangkhai1289</link><description>Jacky Phan さんの最近のアクティビティ</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>Token Authentication using the REST API</title><link>https://www.aras.com/community/b/english/posts/token-authentication-using-the-rest-api</link><pubDate>Thu, 02 May 2019 12:30:00 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:3cef7e0d-c20c-4e1d-8938-82e633d39d2e</guid><dc:creator>Christopher Gillis</dc:creator><description>&lt;p&gt;Aras Innovator&amp;nbsp;introduced an Authentication Server feature in 11.0 SP12 and has been fleshing it out with each new service pack. In 11.0 SP15, it is possible to request an OAuth token from this server that can be used with the &lt;a href="/b/english/posts/tech-tip-using-the-aras-restful-api"&gt;RESTful API&lt;/a&gt; as an alternative to basic authentication.&amp;nbsp;Using tokens is preferred for external apps as they don&amp;#39;t require you to keep your users&amp;#39; passwords in memory while your app runs. Because tokens expire after a set time, you can also rest assured that if a malicious party later acquires&amp;nbsp;the token, they won&amp;#39;t have access to your system.&lt;/p&gt;
&lt;p&gt;In this blog post, we&amp;#39;ll be going over examples of both requesting an OAuth token from the Aras Innovator server as well as using that token to authenticate additional requests. You can also check out this&amp;nbsp;&lt;a href="https://github.com/ArasLabs/rest-auth-example"&gt;Authentication Example&lt;/a&gt; on GitHub for a simple app that will&amp;nbsp;request a token and use that token to query the Parts in a database.&lt;/p&gt;
&lt;h2 id="register-your-app"&gt;Register Your App&lt;/h2&gt;
&lt;p&gt;One of the features of the Authentication Server is to limit what apps can request a token.&amp;nbsp;The Authentication Server keeps a list of registered apps that are able to request tokens, so external applications cannot get tokens by default. If you don&amp;#39;t wish to do any additional configuration, you can use the default &amp;quot;IOMApp&amp;quot; client registry.&amp;nbsp;However, we recommend adding a new client registry to register your app with the server by following the steps below.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the \OAuthServer\OAuth.config in your preferred text editor&lt;/li&gt;
&lt;li&gt;Scroll down to the bottom until you see &lt;strong&gt;&amp;lt;clientRegistry id=&amp;quot;IOMApp&amp;quot;&amp;gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;/strong&gt;Copy this node and all of its child nodes&lt;/li&gt;
&lt;li&gt;Paste them as a new section just below the original node&lt;/li&gt;
&lt;li&gt;Give a new ID to this registry corresponding to the purpose of your app&lt;/li&gt;
&lt;li&gt;Make sure this new registry has&amp;nbsp;&lt;strong&gt;enabled=&amp;quot;true&amp;quot;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;Make note of the ID you give this new registry. You will need to use it in the body of your request for a token which is covered later in this blog.&lt;/p&gt;
&lt;h2&gt;Get the OAuthServer URL&lt;/h2&gt;
&lt;p&gt;The first thing we&amp;#39;ll want to do is query for the location of the OAuthServer.&amp;nbsp;Because Aras Innovator allows most of its components to exist on separate servers, the OAuthServer may not be available from the same server as our Instance URL. However, the Innovator Server does have a way to query for this information by appending&amp;nbsp;&lt;strong&gt;/Server/OAuthServerDiscovery.aspx&lt;/strong&gt; to the end of your Instance URL:&amp;nbsp;&lt;strong&gt;&lt;/strong&gt;http://localhost/InnovatorServer/Server/OAuthServerDiscovery.aspx&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re using something like &lt;a href="https://www.getpostman.com/"&gt;Postman&lt;/a&gt;&amp;nbsp;to follow along with this blog, you can simply perform a get request on this URL with an empty body. The result of this request should look something like below.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;locations&amp;quot;: [&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; {&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "uri": "http://localhost/InnovatorServer/oauthserver/"&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; }&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; ]&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The URL we will use is stored in the&amp;nbsp;&lt;strong&gt;uri&lt;/strong&gt; property of the JSON returned from our request. The JSON path you can use to retrieve this information is&amp;nbsp;&lt;em&gt;locations[0].uri&lt;/em&gt;.&lt;/p&gt;
&lt;h2&gt;Get the Token Endpoint&lt;/h2&gt;
&lt;p&gt;Now that we have the URL of the OAuthServer, we will need to retrieve the exact URL that we can use to query for the token. This next URL is based on the &lt;a href="https://openid.net/specs/openid-connect-discovery-1_0.html"&gt;OpenID discovery specification&lt;/a&gt;. We will take the OAuthServer URL from our previous step and append&amp;nbsp;&lt;em&gt;.well-known/openid-configuration&lt;/em&gt; to the end of it: http://localhost/InnovatorServer/oauthserver/.well-known/openid-configuration. Again, we can query on this URL with a simple GET request without passing anything through the body.&lt;/p&gt;
&lt;p&gt;The response to this request is significantly longer, but it should contain our token endpoint somewhere near the top.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;issuer&amp;quot;: &amp;quot;OAuthServer&amp;quot;,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;jwks_uri&amp;quot;: &amp;quot;http://localhost/InnovatorServer/oauthserver/.well-known/openid-configuration/jwks&amp;quot;,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;authorization_endpoint&amp;quot;: &amp;quot;http://localhost/&lt;span&gt;InnovatorServer&lt;/span&gt;/oauthserver/connect/authorize&amp;quot;,&lt;/code&gt;&lt;br /&gt;&lt;strong&gt;&lt;code&gt;&amp;nbsp; &amp;quot;token_endpoint&amp;quot;: &amp;quot;http://localhost/&lt;span&gt;InnovatorServer&lt;/span&gt;/oauthserver/connect/token&amp;quot;&lt;/code&gt;&lt;/strong&gt;&lt;code&gt;,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;userinfo_endpoint&amp;quot;: &amp;quot;http://localhost/&lt;span&gt;InnovatorServer&lt;/span&gt;/oauthserver/connect/userinfo&amp;quot;,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;end_session_endpoint&amp;quot;: &amp;quot;http://localhost/&lt;span&gt;InnovatorServer&lt;/span&gt;/oauthserver/connect/endsession&amp;quot;,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;...&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The JSON path to retrieve this data is simply&amp;nbsp;&lt;em&gt;token_endpoint&lt;/em&gt;.&lt;/p&gt;
&lt;h2&gt;Get Token&lt;/h2&gt;
&lt;p&gt;The final request we&amp;#39;ll use to retrieve our token will use the token endpoint URL retrieved in the previous step. Because this token will be linked to a user&amp;#39;s credentials, we will need to pass in additional information before making our request. If you&amp;#39;re following along with Postman, you can use the Multipart Form to specify the following pieces of information in your body.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;grant_type&lt;/strong&gt; : &amp;quot;password&amp;quot;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Currently, I believe&amp;nbsp;&lt;strong&gt;&lt;/strong&gt;&amp;quot;password&amp;quot; is the only authentication type allows. Aras as a whole is moving towards more types of authentication in 12.0, so this is likely to change in the upcoming releases.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;scope&lt;/strong&gt; : &amp;quot;Innovator&amp;quot;
&lt;ul&gt;
&lt;li&gt;The scope of information this token will be able to access. &amp;quot;Innovator&amp;quot; will be used for almost all purposes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;client_id&lt;/strong&gt; : &amp;quot;IOMApp&amp;quot;
&lt;ul&gt;
&lt;li&gt;The ID of your client app you configured in the first step of this blog.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;username&lt;/strong&gt; : &amp;quot;YOUR_USER_NAME&amp;quot;
&lt;ul&gt;
&lt;li&gt;Any requests made using the returned token will share the same permissions as this user&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;password&lt;/strong&gt; : &amp;quot;YOUR_MD5_HASHED_PASSWORD&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;database&lt;/strong&gt; : &amp;quot;YOUR_DATABASE_NAME&amp;quot;
&lt;ul&gt;
&lt;li&gt;This should be the name of the database that this token will be able to access. &amp;quot;InnovatorSolutions&amp;quot; is the default name of Aras databases.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After configuring your body, you can send a POST request to the token endpoint URL with the body containing the properties defined above. The response will contain both the OAuth token as well as how long you will have until that token expires.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;access_token&amp;quot;: &amp;quot;YOUR_TOKEN&amp;quot;,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;expires_in&amp;quot;: 3600,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;quot;token_type&amp;quot;: &amp;quot;Bearer&amp;quot;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The JSON path to this token will be&amp;nbsp;&lt;em&gt;access_token&lt;/em&gt;. By default, the IOMApp token expires in 3600 seconds or 1 hour.&lt;/p&gt;
&lt;h2&gt;Make Request with Token&lt;/h2&gt;
&lt;p&gt;If you&amp;#39;ve ever used our previous &lt;a href="/b/english/posts/tech-tip-using-the-aras-restful-api"&gt;RESTful blog&lt;/a&gt;, you&amp;#39;ll know that we authenticated previously by passing in the username and hashed password into the &lt;strong&gt;AUTHUSER&lt;/strong&gt; and &lt;strong&gt;AUTHPASSWORD&lt;/strong&gt; headers respectively. With the token, we will authenticate using the standard HTTP&amp;nbsp;&lt;strong&gt;Authorization&lt;/strong&gt; header. Token authentication using this header follows the format below.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Authorization : Bearer {YOUR_TOKEN}&lt;/p&gt;
&lt;p&gt;Note that the word &amp;quot;Bearer&amp;quot; must come before your token in the header. If you&amp;#39;re using Postman, there should be a way to configure authentication differently than other headers which should automatically add in this word for you. Alternatively, depending on the programming language you&amp;#39;re using to perform this request, there may be a special authentication class or library which will automatically add &amp;quot;Bearer&amp;quot; into the header for you as well.&lt;/p&gt;
&lt;p&gt;Regardless, once you have your Authorization header configured,&amp;nbsp;you can follow along with our previous RESTful blog, and you should notice that you can query for all of the same information. You can also confirm that the permission model is still in place by querying for items to which you do not have access.&lt;/p&gt;
&lt;hr /&gt;
&lt;h3&gt;LOOKING FOR MORE ARAS INSPIRATION?&lt;/h3&gt;
&lt;p&gt;Subscribe to our blog and follow&amp;nbsp;&lt;a href="https://twitter.com/araslabs"&gt;@ArasLabs on Twitter&lt;/a&gt;&amp;nbsp;for more helpful content! You can also find our latest open-source projects and sample code on the&amp;nbsp;&lt;a href="https://github.com/ArasLabs"&gt;Aras Labs&amp;nbsp;GitHub&amp;nbsp;page&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Batch Loader Utility: Automatically add extra characters if a cell contains double quotation mark</title><link>https://www.aras.com/community/f/development/35911/batch-loader-utility-automatically-add-extra-characters-if-a-cell-contains-double-quotation-mark</link><pubDate>Thu, 27 Aug 2020 04:18:48 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:77725dc0-9701-48a2-b11e-ca7aab925f99</guid><dc:creator>Jacky Phan</dc:creator><description>&lt;p&gt;I&amp;#39;m using Batch Loader to import data into ARAS from a csv file. I notice that if a cell contains a double quotation mark &amp;quot;, the tool will automatically add some extra &amp;quot; to the content. It is an annoying behavior.&lt;/p&gt;
&lt;p&gt;Example: A cell content in the CSV file is: This is test&amp;quot; field .&lt;/p&gt;
&lt;p&gt;=&amp;gt; What is display in Batch Loader: &lt;span style="color:#ff0000;"&gt;&amp;quot;&lt;/span&gt;This is test&amp;quot;&lt;span style="color:#ff0000;"&gt;&amp;quot;&lt;/span&gt; field.&lt;span style="color:#ff0000;"&gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Does anyone know how to fix the problem? Thanks in advance.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Is this possible if get an ItemType inside another query within AML?</title><link>https://www.aras.com/community/f/development/35819/is-this-possible-if-get-an-itemtype-inside-another-query-within-aml</link><pubDate>Tue, 28 Jul 2020 09:16:58 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:80e3ffdd-0b61-48bb-9c77-3401d2d670ad</guid><dc:creator>Jacky Phan</dc:creator><description>&lt;p&gt;I have two ItemTypes &lt;strong&gt;Person&lt;/strong&gt; and &lt;strong&gt;Address&lt;/strong&gt;. There is a property &lt;strong&gt;Person.address_id&lt;/strong&gt; that stores the config_id of an address, for a particular purpose it is just a string type, not refer ItemType. I use below query to select a person &lt;strong&gt;(*)&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#800080;"&gt;&amp;lt;Item &lt;span style="color:#ff0000;"&gt;action&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;#39;get&amp;#39;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;#39;PERSON&amp;#39; select =&amp;#39;address_id&amp;#39;&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&lt;span style="color:#800080;"&gt;&amp;lt;id&amp;gt;&lt;/span&gt;&amp;#39;abcdxyz&amp;#39;&lt;span style="color:#800080;"&gt;&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#800080;"&gt;&amp;lt;/Item&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#800080;"&gt;&lt;span style="color:#000000;"&gt;I want to add some AML code to get Address Item with the id provided in above statement, something likes:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#800080;"&gt;&amp;lt;Item &lt;span style="color:#ff0000;"&gt;action&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;#39;get&amp;#39;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;#39;ADDRESS&amp;#39;&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&lt;span style="color:#800080;"&gt;&amp;lt;id&amp;gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;The (*) query that returns an address id&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#800080;"&gt;&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#800080;"&gt;&amp;lt;/Item&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;I know that we can achieve the goal by writing a server method, but I just curious is there any way to get that within AML query?&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Many thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#800080;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#800080;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#800080;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Error while doing mass promotion</title><link>https://www.aras.com/community/f/development/9460/error-while-doing-mass-promotion</link><pubDate>Mon, 13 Apr 2020 04:18:33 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:48904503-4450-448b-8689-c8e931c8660c</guid><dc:creator>Jacky Phan</dc:creator><description>&lt;p&gt;I&amp;#39;m trying to do mass promotion but got following error after executed:&lt;/p&gt;
&lt;p&gt;String or binary data would be truncated.&lt;br /&gt;The statement has been terminated. in SQL: INSERT INTO [MPO_MASSPROMOTIONRECORD] ( [BEFORE_PROMOTE_ITEM_ID],[BEHAVIOR],[CONFIG_ID],[CREATED_BY_ID],[CREATED_ON],[CURRENT_STATE],[GENERATION],[GOT_COMMENT],[ID],[IS_CURRENT],[IS_PROMOTED],[IS_RELEASED],[ITEM_CONFIG_ID],[ITEM_KEYED_NAME],[KEYED_NAME],[LOCKED_BY_ID],[MAJOR_REV],[MANAGED_BY_ID],[MODIFIED_BY_ID],[MODIFIED_ON],[NEW_VERSION],[NOT_LOCKABLE],[OWNED_BY_ID],[PERMISSION_ID],[RELATED_ID],[SORT_ORDER],[SOURCE_ID],[STATE],[STATE_BEFORE],[STATUS_ERROR],[TEAM_ID] ) VALUES ( @p0,@p1,@p2,@p3,@p4,@p5,@p6,@p7,@p8,@p9,@p10,@p11,@p12,@p13,@p14,@p15,@p16,@p17,@p18,@p19,@p20,@p21,@p22,@p23,@p24,@p25,@p26,@p27,@p28,@p29,@p30 )&lt;/p&gt;
&lt;p&gt;Anyone know how to fix it? Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Let me Help You</title><link>https://www.aras.com/community/achievements/687f4b6d-e18a-4e55-836c-49926ca2c9d9</link><pubDate>Mon, 13 Apr 2020 08:29:21 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:fa49a3dc-d29b-4cce-9f8b-8a0be66716d0</guid><dc:creator /><description>Answer a question that is verified as helpful or correct.</description></item><item><title>Jacky Phan</title><link>https://www.aras.com/community/members/quangkhai1289/activities/b672f794-eee0-49b2-813a-375f0e300974</link><pubDate>Mon, 13 Apr 2020 04:20:41 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b672f794-eee0-49b2-813a-375f0e300974</guid><dc:creator>Jacky Phan</dc:creator><description>&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>I have problem. can you Help me?</title><link>https://www.aras.com/community/f/community/3914/i-have-problem-can-you-help-me</link><pubDate>Thu, 06 Sep 2018 06:54:04 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:a5c70268-0548-4e33-a132-7b6cd8ec588c</guid><dc:creator>Former Member</dc:creator><description>Hello,

I am trying to export a package.

I get the following error:

faultstring: RelationshipType with name=”ItemType_xPropertyDefinition” is not found.
faultdetail: RelationshipType with name=”ItemType_xPropertyDefinition” is not found.
faultcode:   -1

How can I further analyze this error? thanks&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Ask A Question I</title><link>https://www.aras.com/community/achievements/460ac7df-7ccc-4c42-a204-9e05eef3be09</link><pubDate>Wed, 12 Dec 2018 22:58:43 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:41925aa7-64fc-4b0e-8f8a-2b45c5bfb9ef</guid><dc:creator /><description>Ask a question in a forum.</description></item><item><title>How to upload an image from local PC then assign it to a property type &amp;quot;Image&amp;quot;</title><link>https://www.aras.com/community/f/development/4061/how-to-upload-an-image-from-local-pc-then-assign-it-to-a-property-type-image</link><pubDate>Thu, 06 Dec 2018 04:18:05 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:80198b0d-2413-4a06-86f8-8867eb1b3384</guid><dc:creator>Jacky Phan</dc:creator><description>I&amp;#39;m build an external .net tool using IOM dll. I have an item type &amp;quot;Company&amp;quot; contains a property type Image named &amp;quot;Picture&amp;quot;, and in order to import data for Company I would like to upload an image from Local PC then set the uploaded one to Picture.

I know that the behavior looks like &amp;quot;Select an image...&amp;quot; browser in ARAS Innovator, but I can&amp;#39;t find the methods to do that.

I have tried to upload a image to File Handing-&amp;gt;Files first, then get its id, get the file item by this id and assign to Company but it doesn&amp;#39;t work properly, example code:
&lt;blockquote&gt;Item company = inn.new(&amp;quot;Company&amp;quot;, &amp;quot;add&amp;quot;); // create new company
Item file = Innovator.newItem(&amp;quot;File&amp;quot;, &amp;quot;get&amp;quot;); // get the file with id
file.setID(&amp;quot;Id of the image&amp;quot;);
file = file.apply();
if(file.isError())
{
return false;
}
company.setPropertyItem(&amp;quot;Picture&amp;quot;, file);

&amp;nbsp;&lt;/blockquote&gt;
Any idea? Thanks in advanced.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>