@magic-xpa/engine 4.1100.0-dev4110.242 → 4.1100.0-dev4110.244

Sign up to get free protection for your applications and to get access to all the features.
@@ -5462,6 +5462,9 @@ class RemoteCommandsProcessor extends CommandsProcessorBase {
5462
5462
  (!NString.IsNullOrEmpty(eventDescription)
5463
5463
  ? NString.Format(' while executing [{0}]', eventDescription)
5464
5464
  : NString.Empty);
5465
+ this._requestInfo.recordSuffixTriggeredBy = cmd.getFieldsInfo()
5466
+ ? cmd.getFieldsInfo()
5467
+ : null;
5465
5468
  }
5466
5469
  }
5467
5470
  }
@@ -7751,6 +7754,9 @@ class BrowserEscEventCommand extends EventCommand {
7751
7754
  getCommandInfo() {
7752
7755
  return NString.Format('[{0}{1} in {2}]', this.EventDescription, this.CloseSubformOnly ? ' Subform Only' : NString.Empty, isNullOrUndefined(this.Task) ? NString.Empty : this.Task.getTaskInfo());
7753
7756
  }
7757
+ getFieldsInfo() {
7758
+ return NString.Empty;
7759
+ }
7754
7760
  }
7755
7761
 
7756
7762
  class IndexChangeEventCommand extends EventCommand {
@@ -7891,6 +7897,7 @@ class TransactionCommand extends ClientOriginatedCommandTaskTag {
7891
7897
  Oper;
7892
7898
  ReversibleExit = false;
7893
7899
  Level;
7900
+ UpdatedFields;
7894
7901
  get CommandTypeAttribute() {
7895
7902
  return ConstInterface.MG_ATTR_VAL_TRANS;
7896
7903
  }
@@ -7907,6 +7914,9 @@ class TransactionCommand extends ClientOriginatedCommandTaskTag {
7907
7914
  constructor() {
7908
7915
  super();
7909
7916
  }
7917
+ getFieldsInfo() {
7918
+ return this.UpdatedFields != undefined ? this.UpdatedFields : '';
7919
+ }
7910
7920
  getCommandInfo() {
7911
7921
  return NString.Format('[{0} in {1}]', this.Oper === 'C' ? 'Commit Transaction' : 'Abort Transaction', this.Task.getTaskInfo());
7912
7922
  }
@@ -8226,12 +8236,13 @@ class CommandFactory {
8226
8236
  recomputeCommand.IgnoreSubformRecompute = ignoreSubformRecompute;
8227
8237
  return recomputeCommand;
8228
8238
  }
8229
- static CreateTransactionCommand(oper, taskTag, cReversibleExit, level) {
8239
+ static CreateTransactionCommand(oper, taskTag, cReversibleExit, level, updatedFields) {
8230
8240
  let transactionCommand = new TransactionCommand();
8231
8241
  transactionCommand.TaskTag = taskTag;
8232
8242
  transactionCommand.Oper = oper;
8233
8243
  transactionCommand.ReversibleExit = cReversibleExit;
8234
8244
  transactionCommand.Level = level;
8245
+ transactionCommand.UpdatedFields = updatedFields;
8235
8246
  return transactionCommand;
8236
8247
  }
8237
8248
  static CreateUnloadCommand() {
@@ -15167,6 +15178,22 @@ class Record {
15167
15178
  }
15168
15179
  return true;
15169
15180
  }
15181
+ getUpdatedFields() {
15182
+ let dv = this._dataview;
15183
+ let originalRec = dv.getOriginalRec();
15184
+ let size = this.getSizeFld(false);
15185
+ let start = this.getFromFldIdx(false);
15186
+ let fields = [];
15187
+ let tableName = this.getFieldsTab().getField(0).getTableName();
15188
+ for (let i = 0; i < start + size; i++) {
15189
+ const field = this.getFieldsTab().getField(i);
15190
+ if (!this.fldValsEqual(originalRec, i)) {
15191
+ fields.push(' ' + field.getCtrl().getName());
15192
+ }
15193
+ }
15194
+ if (fields.length > 0)
15195
+ return tableName + ':' + fields.toString();
15196
+ }
15170
15197
  fldValsEqual(rec, fldIdx) {
15171
15198
  let type = this.getFieldsTab().getField(fldIdx).getType();
15172
15199
  return ExpressionEvaluator.mgValsEqual(this.GetFieldValue(fldIdx), this.IsNull(fldIdx), type, rec.GetFieldValue(fldIdx), rec.IsNull(fldIdx), type);
@@ -18870,7 +18897,11 @@ class TaskTransactionManager {
18870
18897
  if (currentTransaction !== null && !this.task.isAborting() &&
18871
18898
  currentTransaction.isOpened() && currentTransaction.isOwner(this.task) &&
18872
18899
  currentTransaction.getLevel() === level) {
18873
- let cmd = CommandFactory.CreateTransactionCommand(oper, this.task.getTaskTag(), reversibleExit, level);
18900
+ let updatedFields = '';
18901
+ let currRec = this.task.DataView.getCurrRec();
18902
+ if (currentTransaction.getLevel() === "P")
18903
+ updatedFields = currRec.getUpdatedFields();
18904
+ let cmd = CommandFactory.CreateTransactionCommand(oper, this.task.getTaskTag(), reversibleExit, level, updatedFields);
18874
18905
  if (this.isClosingTopmostTask && MGDataCollection.Instance.StartupMgData.getFirstTask().ClosingFormUI)
18875
18906
  this.task.getMGData().CmdsToServer.Add(cmd);
18876
18907
  try {
@@ -29632,7 +29663,7 @@ class CommandsTable {
29632
29663
  }
29633
29664
  }
29634
29665
 
29635
- let CurrentClientVersion = '4.1100.0-dev4110.242';
29666
+ let CurrentClientVersion = '4.1100.0-dev4110.244';
29636
29667
 
29637
29668
  class ClientManager {
29638
29669
  static _instance = null;