I am using the current setup to attempt to use a query to update a UD table. From everything I can see this should pull a query and fill a table with said query and then overwrite what is currently the UD15 table with the new one. In the query I also have it filling the Keys with unique information pulled on the query. If I run the BPM it appears to do something, but afterwards if I check the UD15 table it has not been updated with the new results. Is there something I am overlooking?
A is append and U is update. What part are you deleting the values in the ud table at? Think your append attempt is being stumped by the records already existing
I use a message widget after the fill widget to display the values in the datatable that you are updating in your fill widget. This tells me whether it is actually filling the table.
In the message I use a table query. right click when you are editing the message in the widget and display the contents of your table.
The table should be starting empty before the query as I’m creating a variable to store it but not setting it to hold the data that is currently in UD15. I’m filling this variable with the query and then trying to overwrite what is currently in UD15 with this variable. Does Epicor fill it with the current data when that variable is created and if so is there a way to avoid this or an easy method of clearing it out to start fresh?
Todd, after you fill your variable use the message widget to make sure that it is actually filled.
I added some extra code prior to the table query that goes in and deletes all the rows in the UD table itself and it worked. Was trying to strictly use the BO methods provided to do most of the interactions with the database but that might not be possible.
noticed the errors bool on your Invoke BO Method is set to ignore. Perhaps your should check the result from that. BL tester is also another good way to test an update of data
I just inserted data into a UD table a few days ago, but done with a custom code widget
using(Ice.Contracts.UD02SvcContract u = Ice.Assemblies.ServiceRenderer.GetService<Ice.Contracts.UD02SvcContract>(Db))
{
UD02Tableset ds = new UD02Tableset();
for(int i=0;i<ttInvcHead.Count;i++)
{
u.GetaNewUD02(ref ds);
ds.UD02[i].Key1 = "InvcHead";
ds.UD02[i].Key2 = ttInvcHead[i].Company;
ds.UD02[i].Key3 = ttInvcHead[i].InvoiceNum.ToString();
ds.UD02[i].Character01 = ttInvcHead[i].RowMod;
ds.UD02[i].ShortChar01 = ttInvcHead[i].EntryPerson;
ds.UD02[i].ShortChar02 = callContextClient.CurrentUserId;
ds.UD02[i].ShortChar03 = callContextClient.CurrentCompany;
ds.UD02[i].ShortChar04 = callContextClient.ProcessId;
u.Update(ref ds);
}
}