UD01 Table isnt linking correctly in the following customization. Although the code to generate new records on load work correctly the fields do not pull into my customization. So all I see on the bound fields for UD01 is blank and grey. This code works for other adaptors, but with the Sales Order I am having issues. Can anyone think of a reason this isnt working correctly?
I fed the WhereClasues to a message box so the keys and the correct values are being set in the getUD01Data method. I am quite puzzled.
Is there already data in the UD01 table that should be linked to the Sales order that you’re testing with?
I would add the messagebox to the GetUD01Data method at this point to make sure that the query is returning data:
if ((this._ud01Adapter.UD01Data.UD01.Rows.Count > 0))
{
EpiMessageBox.Show( "Record found. Key1: "+this._Key1UD01+" Key2: "+this._Key2UD01+" Key3: "+this._Key3UD01+" Key4: "+this._Key4UD01+" Key5: "+this._Key5UD01);
this._edvUD01.Row = 0;
} else
{
EpiMessageBox.Show( "No Records Returned. Getting new record");
this._edvUD01.Row = -1;
GetNewUD01Record();
}
Are you able to dump the line that you are expecting to link to as well as the output from the where clause messagebox you added?
One other thing that I’d check out is that the first if is checking if ANY of they keys don’t match, however, the whereClause is only for the keys 1 and 2. I would think that you should, at least, have the key 5, which is the index.
You can csee the following in the code for get new: