<?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>Link in children&amp;#39;s Item Type view to the parent&amp;#39;s Item Type view</title><link>https://www.aras.com/community/f/development/37267/link-in-children-s-item-type-view-to-the-parent-s-item-type-view</link><description>Hello everyone, 
 Try explain, my scenario: 
 I have the Item Types related: 
 1&amp;#176; Item type Authorization. 2&amp;#176; Item type AuthorizationTittle. 3&amp;#176; Item type AuthorizationTittleRelation (only to related). 
 I need add a link or buton in AuthorizationTittle</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Link in children's Item Type view to the parent's Item Type view</title><link>https://www.aras.com/community/thread/8206?ContentTypeID=1</link><pubDate>Fri, 08 Apr 2022 12:05:49 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:2adf217c-2138-4e62-9801-f8b3ce9e086e</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Happy to hear you solved it!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Link in children's Item Type view to the parent's Item Type view</title><link>https://www.aras.com/community/thread/8204?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 14:47:24 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b5e69e3d-feab-4b24-b48f-20af9d2049cd</guid><dc:creator>Helio</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/Selection_5F00_283.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Link in children's Item Type view to the parent's Item Type view</title><link>https://www.aras.com/community/thread/8203?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 14:46:49 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:86f5dd21-cb66-4d87-a74e-b4cfa9ae246d</guid><dc:creator>Helio</dc:creator><description>&lt;p&gt;Hello, angela,&lt;/p&gt;
&lt;p&gt;Firstly thanks for the tips.&lt;/p&gt;
&lt;p&gt;I got a solution, I&amp;#39;ll try to explain it to you.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1&amp;deg; In the AuthorizationTittleRelation(relation item), I added the JS in the event OnInsertRow and this JS recover the parent.thisItem.getID() and set a document.cookie &amp;quot;currentAuthorizationJSON&amp;quot;.&lt;/li&gt;
&lt;li&gt;2&amp;deg; In the AuthorizationTittle more specific in the form, I add the JS in the event OnFormPopulated that do this below.&lt;br /&gt;FYI: The z_authorization(Item is your type) is my field in the AuthorizationTittle the related with Authorization.&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;if (document.thisItem.getProperty(&amp;quot;z_authorization&amp;quot;) === undefined ||&lt;/em&gt;&lt;br /&gt;&lt;em&gt; document.thisItem.getProperty(&amp;quot;z_authorization&amp;quot;) === null ||&lt;/em&gt;&lt;br /&gt;&lt;em&gt; document.thisItem.getProperty(&amp;quot;z_authorization&amp;quot;).trim() === &amp;#39;&amp;#39;) {&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;var currentAuthorizationObj = JSON.parse(getCookie(&amp;#39;currentAuthorizationJSON&amp;#39;));&lt;/em&gt;&lt;br /&gt; &lt;br /&gt;&lt;em&gt; document.thisItem.setProperty(&amp;quot;z_authorization&amp;quot;, currentAuthorizationObj.id);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;3&amp;deg; And to have the link to Authorization in the AuthorizationTittle&amp;#39;s form I added in the form the field of the Item Type(z_authorization) with Disabled checked.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br /&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Link in children's Item Type view to the parent's Item Type view</title><link>https://www.aras.com/community/thread/8202?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 13:09:18 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:d593eaaa-8e95-422d-9f1f-c301c91823b4</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Ok I slowly understand your problem. In this case you cannot use onBeforeAdd/Update.&lt;/p&gt;
&lt;p&gt;You need either a ItemType Client Event or a RelationshipType event. I am not sure right now cause I never had tested it by myself.&lt;/p&gt;
&lt;p&gt;I would start with an onInsertRow event in RelationshipType:&lt;/p&gt;
&lt;p&gt;Get the parent id with something like this:&amp;nbsp;parent.thisItem.getID();&lt;/p&gt;
&lt;p&gt;Then add the id automatically to the related item (check out Method &amp;#39;Increment Sequence Number&amp;#39;). Approach with ItemType Event would be some kind of similar.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Link in children's Item Type view to the parent's Item Type view</title><link>https://www.aras.com/community/thread/8199?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 17:44:26 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:deb6cff8-0e08-44e0-a960-f8a7c7f57cea</guid><dc:creator>Helio</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I tried something like this, in the before and after add in AuthorizationTittle, but the issue is that the RelationshipItemType is filled only in the save of the Authorization(parent) form.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s a big issue.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Link in children's Item Type view to the parent's Item Type view</title><link>https://www.aras.com/community/thread/8198?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 17:38:08 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:6a999f91-e946-4270-ae24-71811aa3a1cc</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;OK, then just some ids? Which event type do you use?&lt;/p&gt;
&lt;p&gt;Depending on the event, your code would look something like this:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Item &lt;span&gt;findParent =&amp;nbsp;&lt;/span&gt;inn.newItem(&amp;quot;nameOfRelationship&amp;quot;,&amp;quot;get&amp;quot;);&lt;br /&gt;&lt;span style="font-family:inherit;"&gt;findParent.setProperty(&amp;quot;related_id&amp;quot;,&amp;quot;mytitulosid&amp;quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;findParent.setAttribute(&amp;quot;select&amp;quot;, &amp;quot;source_id&amp;quot;);&lt;br /&gt;findParent = findParent.apply();&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Item result = findParent.getItemByIndex(0).getProperty(&amp;quot;source_id&amp;quot;,&amp;quot;&amp;quot;);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;return inn.newResult(&amp;quot;Result: &amp;quot; + result);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;You can try it in the Method editor first with hardcoded values.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Link in children's Item Type view to the parent's Item Type view</title><link>https://www.aras.com/community/thread/8197?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 17:30:13 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:a6af0365-9434-4b16-83c5-2307d7cf0518</guid><dc:creator>Helio</dc:creator><description>&lt;p&gt;Thanks again,&lt;/p&gt;
&lt;p&gt;I really need the Authorization ID before save the AuthorizationTittle, and I cant have in the AuthorizationTittle&amp;#39;s form a selection list of Authorizations, this would have to be transparent to the user.&lt;/p&gt;
&lt;p&gt;Do you have any more suggestions?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Link in children's Item Type view to the parent's Item Type view</title><link>https://www.aras.com/community/thread/8196?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 17:24:12 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:00c80b7d-419f-456b-95d9-417c44479070</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Much better! &lt;span class="emoticon" data-url="https://www.aras.com/community/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If your related item would be just a null-relationship things would be easy, cause you simply use the &amp;quot;source_id&amp;quot; property in your form.&lt;/p&gt;
&lt;p&gt;If you have a related item with a relationship in between, things get more complicated. Problem: You can have more then one parent items.&lt;/p&gt;
&lt;p&gt;Do you really need your mentioned &amp;quot;&lt;span&gt;Authorization ID&amp;quot;,&lt;/span&gt;&amp;nbsp;or do you just search for a backlink option?&lt;/p&gt;
&lt;p&gt;For viewing parent items the classical approach would be to use some kind of &amp;quot;Where Used / Parent items&amp;quot; tab with a TreeGridView that displays all parents of the item. For example ItemType &amp;quot;Manufacturer&amp;quot; uses this approach.&lt;/p&gt;
&lt;p&gt;A custom html field in the Form that shows the ids or source elements itself would also be possible, but requires much more programming.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Link in children's Item Type view to the parent's Item Type view</title><link>https://www.aras.com/community/thread/8195?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 17:07:14 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:8c65bff2-9e7e-45c0-b7e0-853f4912f5df</guid><dc:creator>Helio</dc:creator><description>&lt;p&gt;Hello, I have two forms one to insert new &amp;quot;&lt;span&gt;Authorization&amp;quot; this below picture, and when I click in the in the button plus the new form is opened, to insert the new &amp;quot;AuthorizationTittle&amp;quot; second picture, and the issue is that I need the&amp;nbsp;Authorization ID before save the&amp;nbsp;AuthorizationTittle, second form.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/Selection_5F00_279.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/Selection_5F00_281.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Link in children's Item Type view to the parent's Item Type view</title><link>https://www.aras.com/community/thread/8192?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 16:24:45 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:aa84d44d-fda7-4f76-991b-d55d545b1743</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;I am not sure if you are looking for something standard or something more complex.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you can provide a screenshot or drawing where you show which data shall be displayed where, it will probably help even more :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Link in children's Item Type view to the parent's Item Type view</title><link>https://www.aras.com/community/thread/8191?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 16:20:26 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:3ea7aa4b-d3fa-41e2-ad11-41e49a4c0603</guid><dc:creator>Helio</dc:creator><description>&lt;p&gt;Hello, thanks for the answer.&lt;/p&gt;
&lt;p&gt;Let me see if I understand, the Item Type &amp;quot;AuthorizationTittleRelation&amp;quot; is filled only when saving the view in Authorization and need to discover the ID of the parent(Authorization) when I save the AuthorizationTittle in this moment I don&amp;#39;t have yet the AuthorizationTittleRelation.&lt;/p&gt;
&lt;p&gt;If you can pass on more details, it&amp;#39;ll help me a lot.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Link in children's Item Type view to the parent's Item Type view</title><link>https://www.aras.com/community/thread/8188?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 16:04:11 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:c9ab82c5-63ff-48dd-a808-c736fb8ef82a</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Simplest way to get a connection is to unhide the &amp;quot;related_id&amp;quot; property in your Relationship ItemType (the 2nd one). Just as done in Part AML.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>