BAQ DataView - column added after BAQ


I’ve got a BAQ DataView bound to a grid on the Part Advisor form. Works well, and highlights some conditions too. I’ve added another column to the underlying BAQ, but it isn’t showing up in the grid. You can’t select the columns either.

// **************************************************
// Custom code for PartAdvisorForm
// Created: 28/04/2018 10:31:34
// **************************************************

extern alias Erp_Contracts_BO_PartAdvisor;
extern alias Erp_Contracts_BO_Part;

using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Erp.Adapters;
using Erp.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;
using Ice.Lib.Broadcast;

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 baqViewOnHand;

	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	


	public void DestroyCustomCode()
		// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
		// Begin Wizard Added Object Disposal

		// End Wizard Added Object Disposal

		// Begin Custom Code Disposal

		// End Custom Code Disposal

	public void CreateLateBAQView()
		baqViewOnHand = new BAQDataView("PartAdvisorOnHandIncQAHoldGrid");
		oTrans.Add("OnHandIncQAHold", baqViewOnHand);

		string pubBinding = "PartView.PartNum";
		IPublisher pub = oTrans.GetPublisher(pubBinding);
		if(pub == null)
			oTrans.PublishColumnChange(pubBinding, "MyCustomPublish");
			pub = oTrans.GetPublisher(pubBinding);

		if(pub !=null)
			baqViewOnHand.SubscribeToPublisher(pub.PublishName, "PartBin_PartNum");

	private void CreateRowRuleOnHandIncQAHoldCalculated_QAHoldNotNulEquals_true()
		// Description: QAHold
		// **** begin autogenerated code ****
		RuleAction warningOnHandIncQAHold_RowAction = RuleAction.AddRowSettings(this.oTrans, "OnHandIncQAHold", false, SettingStyle.Error);
		RuleAction[] ruleActions = new RuleAction[] {
		// Create RowRule and add to the EpiDataView.
		RowRule rrCreateRowRuleOnHandIncQAHoldCalculated_QAHoldNotNulEquals_true = new RowRule("OnHandIncQAHold.Calculated_QAHoldNotNul", RuleCondition.Equals, true, ruleActions);
		// **** end autogenerated code ****

	private void CreateRowRuleOnHandIncQAHoldPartLot_ExpirationDateLessThan_Constant_MinCode()
		// Description: MinStockDate
		// **** begin autogenerated code ****
		RuleAction errorOnHandIncQAHold_RowAction = RuleAction.AddRowSettings(this.oTrans, "OnHandIncQAHold", false, SettingStyle.Warning);
		RuleAction[] ruleActions = new RuleAction[] {
		// Create RowRule and add to the EpiDataView.
		RowRule rrCreateRowRuleOnHandIncQAHoldPartLot_ExpirationDateLessThan_Constant_MinCode = new RowRule("OnHandIncQAHold.PartLot_ExpirationDate", RuleCondition.LessThan, DateTime.Today.AddDays(10), ruleActions);
		// **** end autogenerated code ****

	private void PartAdvisorForm_Load(object sender, EventArgs args)
		EpiDataView evContext = ((EpiDataView)(oTrans.EpiDataViews["CallContextClientData"])); 
		oTrans.EpiBaseForm.Text  = oTrans.EpiBaseForm.Text  + " (" + evContext.CurrentDataRow["CustomizationId"].ToString() + ")";

Image to show that there isn’t the option on the grid to choose columns:

I think you need to go to Personalization rather then customization. Then click the grid, look for the collection dropdown menu, and un-check in the hide column. Then you can save your customization again to have the personalization applied to it.

I looks like it’s an embedded dashboard and not a BAQ DataView. If it’s a dashboard you will need to update the dashboard.

@Carson for the win, thanks so much - easy when somebody points it out to you!