<?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>populate defaul property via javeascript</title><link>https://www.aras.com/community/f/development/37504/populate-defaul-property-via-javeascript</link><description>When i create a new item via a relationship called Subcontract , there is a property called MASTER_DID on subcontact which is datatype item as well, when the user selects a MASTER_DID the owner of MASTER_DID should auto populate with the owner of Subcontract</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: populate defaul property via javeascript</title><link>https://www.aras.com/community/thread/8661?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2022 17:47:31 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:bb62ed33-1809-4caa-926b-291ffef25c8d</guid><dc:creator>hkhan</dc:creator><description>&lt;p&gt;Hello Thank you that worked!, also If this relationship is on the DID Master Item itself, how can i inherit master DID value, when sdrl DID is created from the relationship?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/pastedimage1660240028226v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: populate defaul property via javeascript</title><link>https://www.aras.com/community/thread/8645?ContentTypeID=1</link><pubDate>Fri, 05 Aug 2022 09:36:28 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:e3ad1768-e130-4b92-8037-bc920930dc75</guid><dc:creator>Gopikrishnan</dc:creator><description>&lt;p&gt;My bad. Updated the code&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: populate defaul property via javeascript</title><link>https://www.aras.com/community/thread/8639?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 17:40:37 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b3fb9b15-3b30-4659-83c1-fbcf3c0146b5</guid><dc:creator>hkhan</dc:creator><description>&lt;p&gt;hello&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am getting the following error when i apply this, any idea why? relateditem seems to be defined already&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/pastedimage1659634764128v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: populate defaul property via javeascript</title><link>https://www.aras.com/community/thread/8635?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 06:30:21 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:da347cc6-2dda-4a09-95ea-b494b56565f0</guid><dc:creator>Gopikrishnan</dc:creator><description>&lt;p&gt;Hi HKhan&lt;/p&gt;
&lt;p&gt;Attach this method to DID Master Property - OnEditFinsh&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;let selectedMasterDID = gridApplet.cells(relationshipID, colNumber).getValue();
if(selectedMasterDID)
{
var getMasterDID = aras.getItemById(&amp;quot;Master DID&amp;quot;, selectedMasterDID);
setRelationshipProperty(relationshipID, &amp;#39;first_delivery&amp;#39;, aras.getItemProperty(getMasterDID, &amp;quot;first_delivery&amp;quot;,&amp;quot;&amp;quot;)); //If first_delivery property is in relationship then use this line
setRelatedItemProperty(relationshipID, &amp;#39;first_delivery&amp;#39;, aras.getItemProperty(getMasterDID, &amp;quot;first_delivery&amp;quot;,&amp;quot;&amp;quot;)); // If first_delivery property is in Related Item then use this line
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: populate defaul property via javeascript</title><link>https://www.aras.com/community/thread/8634?ContentTypeID=1</link><pubDate>Wed, 03 Aug 2022 16:52:20 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:0293f0a1-d4b7-40aa-8119-b55070f27b9b</guid><dc:creator>hkhan</dc:creator><description>&lt;p&gt;okay so ill rephrase the issue again:&lt;/p&gt;
&lt;p&gt;There are two items&amp;nbsp;Master DID and SDRL&lt;/p&gt;
&lt;p&gt;Both these item contains a property called &lt;span&gt;first_delivery&amp;nbsp;&lt;/span&gt;which is a string data type.&lt;/p&gt;
&lt;p&gt;Supplier DID has a property called master_did which is an item property links to Master DID item.&lt;/p&gt;
&lt;p&gt;There is a third item called subcontract, when the user creates a new&amp;nbsp;&lt;span&gt;SDRL&lt;/span&gt; from the relationship in subcontract item and select master_did I want &lt;span&gt;first_delivery&amp;nbsp;&lt;/span&gt;to be populated instantly from Master DID before saving.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Please not: it cannot be foreign property as it should be editable&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Following are the screen shots.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/pastedimage1659545361821v2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: populate defaul property via javeascript</title><link>https://www.aras.com/community/thread/8559?ContentTypeID=1</link><pubDate>Thu, 21 Jul 2022 17:05:50 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:bceb3b00-ae8c-4b30-9ec2-cc9a27a0a271</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;You cannot use document.thisItem outside the context of a Form. Better try &amp;quot;this&amp;quot;. Or take a look at &amp;quot;PE_SetTeam&amp;quot; which is maybe the better sample in your case.&lt;/p&gt;
&lt;p&gt;Otherwise&amp;nbsp;show screenshots of the situation cause I really don&amp;acute;t know what you try to do ;-)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Edit: My sample Methods where intended as onAfterNew &amp;quot;Client Events&amp;quot; not as property events. So beware!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: populate defaul property via javeascript</title><link>https://www.aras.com/community/thread/8558?ContentTypeID=1</link><pubDate>Thu, 21 Jul 2022 16:56:56 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b35ace74-f48a-42dc-89b4-30845ceca468</guid><dc:creator>hkhan</dc:creator><description>&lt;p&gt;So im trying the following added code on the property itself, oneditfinish event and i will get the following error&lt;pre class="ui-code" data-mode="text"&gt; var SDRLMDID = document.thisItem.getProperty(&amp;quot;vsy_did_master&amp;quot;,&amp;quot;&amp;quot;); 
 var SDID = this.getInnovator().getItemById(&amp;quot;Supplier DID&amp;quot;, SDRLMDID);
 if (SDID.getItemCount()==1)
    {
        this.setProperty(&amp;quot;vsy_first_delivery&amp;quot;, SDID.getAttribute(&amp;quot;id&amp;quot;));
      this.setPropertyAttribute(&amp;quot;vsy_first_delivery&amp;quot;, &amp;quot;keyed_name&amp;quot;, SDID.getProperty(&amp;quot;keyed_name&amp;quot;, &amp;quot;&amp;quot;));
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/pastedimage1658422577065v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: populate defaul property via javeascript</title><link>https://www.aras.com/community/thread/8555?ContentTypeID=1</link><pubDate>Thu, 21 Jul 2022 12:44:45 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:a2d627bf-4a8a-4326-be67-87e2801ff50e</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Without image the question is a little bit hard to understand&lt;/p&gt;
&lt;p&gt;But maybe you could&amp;nbsp;use a &amp;quot;onAfterNew&amp;quot; Client Event in your ItemType. E.g. check out Method &amp;#39;PE_SetOriginator&amp;quot;. This one is used very often to set the owner&amp;nbsp;property automatically.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>