@Shawn BormannI think the issue here is that the window is using a temporary table.
Your VSTools code is using a new blank instance of the same temporary table .
You need to get access to the actual instance of the table buffer used on the Dexterity form.
Please note that this is something that GP Power Tools can do. It is a lot harder in VSTools.
David
------------------------------
David Musgrave MVP, GPUG All-Star
Managing Director
Winthrop Development Consultants
Perth, Western Australia
http://www.winthropdc.com------------------------------
Original Message:
Sent: 11-28-2018 03:17 PM
From: Shawn Bormann
Subject: VST Accessing Distribution Information
I am using Visual Studio SDK to try and insert some additional validation. Here is what I currently have for code.
public class GPAddIn : IDexterityAddIn { private IvTransactionEntryForm ivTrxForm = Dynamics.Forms.IvTransactionEntry; private IvItemInquiryForm ivItemInq = Dynamics.Forms.IvItemInquiry; public void Initialize() { this.ivTrxForm.IvTransactionEntry.SaveRecord.ValidateBeforeOriginal += new System.ComponentModel.CancelEventHandler(TestStart); } void TestStart(object sender, System.ComponentModel.CancelEventArgs e) { IvDistributionTempTable ivDist = ivTrxForm.Tables.IvDistributionTemp; ivDist.GetFirst(); string Dist = ""; for (int i = 0; i < ivDist.AccountNumber.Length; i++) { Dist += i.ToString() + ": " + ivDist.AccountNumber[i].Value.ToString() + "\r\n"; } var answer = Dynamics.Forms.SyVisualStudioHelper.Functions.DexError.Invoke(Dist); } }
This does not produce any results.

I have tried looking for some additional samples and maybe my Google-Fu is just not strong enough, but I cant find any code examples that give information on getting data for validation. Ultimately the goal is to validate that the Adjustment or Variance is not using the incorrect GL accounts based on Project Selection (Job Number) to prevent posting imbalances. Any help is appreciated. Thanks
------------------------------
Shawn Bormann
------------------------------