I have defined my UD columns for the UD01 Table, regenerated data model, and can create a BAQ on these fields. I am trying to make it an updateable BAQ but when I do that and try to save, I get errors about the UD01.Key1, UD01.Key2 … fields containing non-existent result column. I am not using those columns and when I go to Query to Object Column Mapping, I see that these columns are checked as key fields however it will not let me delete them or uncheck them as key fields. How do I get this error to go away?
They’ll have to be included in some fashion, since they’re the key fields for that table and how Epicor uniquely identifies each record on that table.
You can set them to an expression rather than including them in the BAQ.
Ok. But when setting them to an expression, each one would have to be unique if they are actually key fields. Am I understanding that correct? Or can I just set them all to zeros?
Yes you’re correct. At least 1 of the key fields needs to be unique per record, you could leave 4 out of the 5 blank or as zero’s. Otherwise you could potentially update a record rather than create a new one.
So what I just discovered is that if I add Key1, Key2,… to the BAQ as display fields, suddenly the errors disappear. I only added them as display fields and did not set them to an expression. It that seems being a display field is the only requirement? That doesn’t quite make sense to me.
The expression should have (automatically) updated to point to the fields you just added to the BAQ, the ttResults…key fields.
The expression remains unchanged (UD01.Key1 => ttResult.UD01_Key1). The only thing different is that I added it as a display field.
Right, I see what you mean. But NOW there is actually a ttResult.UD01_Key1 in the ttResults table (the baq results) since you added it to the BAQ, which removed the error. It was pointing to something that wasn’t there previously.
It’s no longer a “non-existent results column”
Got it. Thank you!