BAQ DataView problem when viewing a closed quote

Hi everyone,
I have a BAQ DataView on the Quote entry screen which displays the customer’s EORI number. Everything works well until I view a closed quote when I get a message saying that the Quote is closed and cannot be updated. the only way to escape the message is to close the Quote screen. I have unchecked the ‘Prevent Changes’ to quoted quotes but it has made no difference. I have another BAQ DataView on the quote which has been there a while and has never been a problem. I have placed the code below, if someone can spot what is causing my problem, that would be great!

public void CreateCustEORINumBAQDV()
	custEORINumBAQDV = new BAQDataView("DMT-Customer-EORI");
	string pubBinding = "QuoteHed.CustNum";
	IPublisher pub = oTrans.GetPublisher(pubBinding);
		string pubName = Guid.NewGuid().ToString();
		oTrans.PublishColumnChange(pubBinding, pubName);
		pub = oTrans.GetPublisher(pubBinding);
	if(pub !=null)
	custEORINumBAQDV.SubscribeToPublisher(pub.PublishName, "Customer_CustNum");

Where are you calling the CreateCustEORINumBAQDV from?

I would offer that if this is all used to show a single field from the Customer, you may want to look at the Foreign Key View for the Customer BO. There is no code needed. Just create the FKV and bind to the field(s) you need.

Hi Doug,

It is called from here;

public void InitializeCustomCode()

So if you comment it out, you don’t get the Quote is Closed message?

Hmmm, no, I am still getting it. I just assumed as it was the last thing I did that it would be the cause.
Thanks Doug. I will test a bit more and see if I can track it down