UD Drop list with Predefined Options

I’m gonna show you a BAQ combo since they are super easy.
Create your static list in the User Codes.

Create a BAQ that reads that list and displays the columns you want.


In your customization, add a BAQCombo and bind it via the EpiBinding to your new field on UD_Vendor.

In the BAQ Information properties, set your DisplayMember to the {table}.{field} value you want the user to see in the box. Set the DynamicQueryID to your BAQ name. Set the ValueMember to the {table}.{field} value you want the selection to store in your binding.

Bam, done.

3 Likes

Tried something extremely similar but had no Luck.

Made the User Defined Column Maintenance

Ran the Regenerate Data M.

Launched Developer mode and made the Customization of the Base Layout.
Within the customization I added the EpiCombo Drop Down and pointed it to the UD Column I created.

Saved the Customization.
Created the UD Codes

Added the codes in the Extended Properties

Restarted Epicor but had no luck. The Drop down is there but its grayed out. Any Suggestions?
@Aaron_Moreng I’m gonna go your route if I cant get this one to work.

Update I have no Idea why, but I rebooted Epicor again and launched the correct customization and now the UD Codes are appearing.
image

Do you guys know how to join the vendor table to the UD vendor table so I can pull the existing ratings and the new defined RiskRating?

They should already be joined in the “Vendor” data view. Hence why you can select your RiskRating_c from the drop-down. Do you mean in a BAQ or something?

1 Like

Dan is right, the view presented to the application is a sql view of erp.vendor and erp.vendor_ud (don’t remember if it’s pre or post fix) so the data is essentially one table to work with.

Yes I mean on a BAQ.

Same rules apply in the BAQ Designer. You don’t need to do any joining. It should just appear at the bottom of the list of columns you can select.

The BAQ does but my goal is to join the Vendor to The Vendor_UD on SQL.

If you’re using SQL Server Management Studio, there will be a view that automatically combines (joins) the tables for you. If you had to do it manually, you’d use the ForeignSysRowID column in the UD table and join it to the Vendor SysRowID column (I think). I’ve never had to do it though because the system has always done it for me.

1 Like

Unless you have a really good reason, it’s best to avoid direct SQL access if you can.

LOL. I hear you. I only write queries to pull information so some employees can have custom reports. I then insert them into excel where all they have to do is hit refresh. They are never changing or looking at the code. Also, found the correct join on another thread.
left outer join Erp.table_UD on table.SysRowID = table_UD.ForeignSysRowID

Yep that’s the one.

In case anyone was wondering. The reason it did not pull the codes at first was because the codes need to be linked in the properties prior to inserting the UD column into the customization. Otherwise you will have to delete the epicombo, add the codes to it, and re add it to the customization.

@Banderson has a cool Excel workbook that does the same with REST and BAQs. If you’re nice, he might share it with you and you can avoid the direct DB access. :wink:

actually that’s @amurdock that has that.

That sounds pretty awesome. @amurdock Any chance you could share?

:poop:! Yes, that was Andrew. Blaming it on COVID fog… :thinking:

@LexLawnjac, Here is the link to my post with some instructions on how the Excel workbook is setup and there is a demo file attached to the post you can use as a starting point.

2 Likes

I will check it out.

You can use dbo.Vendor instead of Erp.Vendor, saving some effort to join in SQL query.