UD Table Question

,

I am trying to sue an BPM to push the Order Number to a UD table when an order is created. While setting this up, I am seeing a few things I cannot find info on.

GetNewUD24 and GetaNewUD24…What do these do? Where can I find info on this?

You want GetaNewUD24. If you run a trace, you will see that this is called.
However, Why are you doing this? It would seem you are duplicating data.

I need the ordernum in Number01. Then we will have a screen for the dept managers to bring up the order and add in their specific data, so I can come up with a pallet count for shipping. This data, besides the ordernum, isn’t in Epicor anywhere at this time.

Normally the GET NEW business object simply creates a blank record for you to populate with data. normally you would;

  1. Get New
  2. Populate Data
  3. UPDATE which writes the data.

OR you can also use the UpdateEXT process which skips the GetNew and simply does teh update (or add) at all at the same time without the get new.
Something like this:

using ( var svc = Ice.Assemblies.ServiceRenderer.GetService<Ice.Contracts.UD12SvcContract>()) {

  Click to expand
  Copy to clipboard
  //Build and add the UD12 record
  var UD12 = new Ice.Tablesets.UD12Row {
    Company = "MyCompany",
    Key1 = "Some Value",
    Key2 = "AnotherValue",
    Key3 = "",
    Key4 = "",
    Key5 = "",
    ShortChar01="abc"
  };
  //here we use this example to set UD FIelds:
  UD12.SetUDField<System.String>("UDField1_c", "Some Value");
  UD12.SetUDField<System.String>("UDField2_c", "Some Valueb");
  UD12.SetUDField<System.String>("UDField3_c", "Some Valuec");
  //to delete the record uncomment this line: //UD12.RowMod = "D";
  
  ds.UD12.Add(UD12);
  
  BOUpdErrorTableset boUpdateErrors = svc.UpdateExt(ref ds, false, true, out errorOccurred);
}
1 Like

Just to be sure, you can’t add ID fields to the OrderHed table and add a dashboard to manage them?

Jason Woods
http://LinkedIn.com/in/jasoncwoods

1 Like

I do like that idea. Question: I will need these fields to be summed and put into a read only filed on OrderHed. How would I do that?

Ah. Now that is a perfect reason to use a UD table.
Here are my thoughts:
If the number of data points is small and fixed (less than 15?), then UD Fields could be a good option.
If the number of data point is variable or large, then a UD Table may be better.

Well mostly under 15, but can be higher. Will probably just grab a whole table to be safe. From what I am seeing, I will need to use coding to get the ordenum into the table, huh?