Foreign Key View - Quotes > Orders

I don’t think this is possible with a Foreign Key View… but I did something similar (but reverse) with a BAQ Data View to show Quote Qty Breaks in Order Entry.

Embedded Dashboard will work but they do not perform as well as a BAQ Data View.
BAQ Data View is the best way that I know how to accomplish this but this does require a little bit of custom code.

Here is an example of the BAQDataView code I used in Order Entry to show Quote Qty. (Credit for this goes to Jose Gomez, I used an example of his code to create this)

public class Script
{
    // ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
    // Begin Wizard Added Module Level Variables **

    // End Wizard Added Module Level Variables **

    // Add Custom Module Level Variables Here **
    BAQDataView baqView;

    public void InitializeCustomCode()
    {
	    // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
	    // Begin Wizard Added Variable Initialization

	    // End Wizard Added Variable Initialization

	    // Begin Wizard Added Custom Method Calls

	    // End Wizard Added Custom Method Calls
	    CreateMyBAQView();
    }

    private void CreateMyBAQView()
    {
	    // Create the My BAQ View and add it to transaction
	    baqView = new BAQDataView("TEAMQuoteQty");
	    oTrans.Add("TEAMQuoteBAQView", baqView);

	    // Publish the PartNum from OrderDtl
	    string pubBinding = "OrderDtl.PartNum";
	    IPublisher pub = oTrans.GetPublisher(pubBinding);
	    if (pub == null)
	    {
		    oTrans.PublishColumnChange(pubBinding, "PartNumCustomPub");
		    pub = oTrans.GetPublisher(pubBinding);
	    }

	    // Subcribe to our BAQ View
	    if (pub != null)
		    baqView.SubscribeToPublisher(pub.PublishName, "QuoteDtl_PartNum");

	    // Publish the CustNum from OrderDtl
	    pubBinding = "OrderDtl.CustNum";
	    IPublisher pub2 = oTrans.GetPublisher(pubBinding);
	    if (pub2 == null)
	    {
		    oTrans.PublishColumnChange(pubBinding, "CustNumCustomPub");
		    pub2 = oTrans.GetPublisher(pubBinding);
	    }

	    // Subcribe to our BAQ View
	    if (pub2 != null)
		    baqView.SubscribeToPublisher(pub2.PublishName, "Customer_CustNum");

    }
1 Like