Unofficial Content

WWTransaction.dkt

This template generates an xpz of the original transaction and keeps the   GXObject\Transaction node of the xml (using ObjNode).

foreach (XmlNode objNode in trnExportFile.SelectNodes("/ExportFile/GXObject
if ((objNode.ChildNodes[0].Name == "Transaction") && (objNode.SelectSingleNode("Transaction/Info/StyleClass") == null || ((XmlElement)objNode.SelectSingleNode("Transaction/Info/StyleClass")).InnerText == ""))
 {
// This is the transaction node; all others (tables, styles, subtype groups, etc.) are ignored.
  trnNode = objNode.ChildNodes[0];
  break;
 }
}
This is performed because this is the part of the transaction that will be modified, since all transaction rules and events are preserved.   
Therefore, the only xml node of the transaction to be modified is Transaction, the rest is copied to the final xpz as well as the original xpz. 
bool updateWebForm = (Update != "only rules and events");
Then, the transaction web form will be modified or not, depending on the transaction update property.  

Within this dkt, there is also insertContextAttributes, which is used to setup the PK when a record is inserted and the PK must be instantiated (when adding an invoice from Customers WWW, the customer code goes instantiated).

 

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant