Jump to: navigation, search

Changes


Internal:OnRelationAdded (Event)

625 bytes added, 13:16, 21 May 2015
Created page with "{{Item/Resources/CodeSnippetHeader}} === Example 1 === {{Item/Resources/CodeSnippetInfo|KNO|A document related to a content object is automatically related to the correspond..."
{{Item/Resources/CodeSnippetHeader}}

=== Example 1 ===
{{Item/Resources/CodeSnippetInfo|KNO|A document related to a content object is automatically related to the corresponding WORKPACKAGE object.}}

<syntaxhighlight lang="csharp">
protected override void OnRelationAdded(UBIK.Kernel.Relationship relation, UBIK.Kernel.RelationalObject newChild)
{
//***UBIK
//Your code here
base.OnRelationAdded(relation, newChild);

UBIK.Runtime.WORKPACKAGE wp = (UBIK.Runtime.WORKPACKAGE)this.LK_WORKPACKAGE;
wp.AddRelation(relation, newChild);
if (!wp.IsSaved())
wp.Save();
}
</syntaxhighlight>

[[Category:Internal/Coding]]
10,686
edits