This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Inputs: | |
| * -this: Context Item | |
| * -Properties: | |
| * -pullType - PullType: Options are DDRBaseline, UnitNWD, Baseline, InitialBaseline, or InProgress | |
| * -isInternal - Internal method or not (if not necessary, omit all references to isInternal | |
| */ | |
| //This code grabs a Conversion Rule's ID, an Identity to run the Conversion Rule, a series of properties that need to be added, and then creates a Conversion Task based on the data provided |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Item relationships = this.getRelationships(); | |
| int eventItemsCount = relationships.getItemCount(); | |
| /* for each event in this batch, get the event details and perform | |
| custom publishing logic */ | |
| for (int i = 0; i < eventItemsCount; i++) { | |
| Item eventItem = relationships.getItemByIndex(i); | |
| var data = eventItem.node.SelectNodes("./data"); | |
| string dataXml = string.Empty; | |
| if (data.Count > 0) { | |
| dataXml = data[0].InnerXml; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Item publishEvent = this.newItem("Method", "ehf_PublishEvent"); | |
| Item eventItem = this.newItem(); | |
| // Change the "Custom Event Type Name", "Context item id or subject string", and "Context item data" to actual values | |
| eventItem.setProperty("type", "Custom Event Type Name"); | |
| eventItem.setProperty("subject", "Context item id or subject | |
| string"); | |
| eventItem.setProperty("data", "Context item data"); | |
| publishEvent.setPropertyItem("event", eventItem); | |
| Item result = publishEvent.apply(); | |
| return this; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| // libraries for ConversionServerFramework | |
| using System.IO; | |
| using Aras.ConversionFramework.Converter; | |
| using Newtonsoft.Json.Linq; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (System.Diagnostics.Debugger.Launch()) | |
| { | |
| System.Diagnostics.Debugger.Break(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var inn = aras.IomInnovator; | |
| var partNames = []; | |
| var partItem = document.thisItem; | |
| var partRels = partItem.getRelationships("Part BOM"); | |
| for(var i=0; i<partRels.getItemCount(); i++) { | |
| //gets relationship item | |
| var partRel = partRels.getItemByIndex(i); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let resultValue = Dscore.toFixed(1); | |
| // Error checking for when user is inputting Relevance score and market alignment is note yet set | |
| if(resultValue == "Infinity") { | |
| return; | |
| } | |
| // This call updates the table value using the id of the cell | |
| inArgs.resultBuilder.markToUpdateValue(Dscore_val.id, resultValue); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Grabbing the descendant property type items from the products | |
| let Prod_Values = Key_Diff_Root.findDescendantElements("Prod_Values"); | |
| // Handles the case when we are adding a new key differentiator | |
| if(Prod_Values == undefined || Prod_Values.length == 0) { | |
| return; | |
| } | |
| let current_marketAlignment = ""; | |
| for(let j=0; j < Prod_Values.length; j++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let Dscore_val = Key_Diff_Root.getPropertyItem("DScore"); | |
| let Key_Rel = Key_Diff_Root.getPropertyItem("Relevance"); | |
| if(Dscore_val.value == undefined && Key_Rel.value == undefined) { | |
| return; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let Key_Diff_Root = inArgs.changedPropertyItems[0].getElement().findAncestorElement("Key_Diff"); |
NewerOlder