Job Entry trying to display PO Number?

Hello, I am trying to display the PO number on Job entry, to be more specific Job materials when purchase direct is true. The supplier is displayed and I thought it would be a straight forward customisation but there isn’t a table that is binded that displays the PO.

Not sure if I need FKV( which I feel is a little out of my knowledge scope ) or BPM ?

Any feedback welcome.

Cheers

FKV with PORel.JobNum and PORel.JobSeq or BAQDataView. BPM could be made to work but would probably be way more work. I would personally recommend BAQDataView so you can control the amount of data coming back. That’s all custom code but I’m pretty sure that’s decently documented on here somewhere?

1 Like

The other approach is to replace the Job Status Dashboard with the Job Status Dashboard Plus

THis is a dashboard that ships with Epicor which has the buy direct information in it already as another tab.

I have swapped this dashboard on the menu to upgrade the dashboard to the plus.

PS - there is already a context link to the dashboard off of the job number field.

1 Like

Your guidance helped, I managed to get the PO to display using BAQDataView Jose Helped with the code.

I just need to work around when there are two or more different POs on the same job.
I’m trying to use JobMtl.MtlSeq on the BAQ but I’m not great at coding.
Any Guidance would be welcome.

Multiple POs for the same material for for different materials on the same job?

Sorry, Same Job, Different materials and different POs. I need it to relate to the Sequence on the Job as well as Job. Cheers

Yup so you just need to use two bindings to the BAQDataView one for job num and one for mtl seq. What does your code look like for the BAQDataView and what does your BAQ look like?

I’m not a great coder so please forgive me, This is what i have at the minute you can see im trying to do the second binding but not sure were im going wrong.

The BAQ is just outputing all jobs with POs with their Seq number
Cheers

public void CreateLateBAQView()
	{
		baqViewLate = new BAQDataView("TESTJG");
		oTrans.Add("TESTJGPOBAQ",baqViewLate);
		
		string pubBinding = "JobHead.JobNum";
		IPublisher pub = oTrans.GetPublisher(pubBinding);
		
		
		if(pub!=null)
		{
	
			baqViewLate.SubscribeToPublisher(pub.PublishName, "JobMtl_JobNum");
			
		}
		
		string pubBinding2 = "JobMtl.MtlSeq";
		IPublisher pub2 = oTrans.GetPublisher(pubBinding2);


		if(pub2!=null)
		{
	
			baqViewLate.SubscribeToPublisher(pub2.PublishName, "PORel_JobSeq");
			
		}


	}

select 
	[JobMtl].[JobNum] as [JobMtl_JobNum],
	[PORel].[JobSeq] as [PORel_JobSeq],
	[PORel].[PONum] as [PORel_PONum],
	[JobMtl].[MtlSeq] as [JobMtl_MtlSeq],
	[JobMtl].[PartNum] as [JobMtl_PartNum]
from Erp.JobMtl as JobMtl
inner join Erp.PORel as PORel on 
	JobMtl.Company = PORel.Company
	and JobMtl.JobNum = PORel.JobNum
	and JobMtl.MtlSeq = PORel.JobSeq
where (JobMtl.BuyIt = TRUE)

It looks decent at a glance, but here is the latest iteration of this Jose and I have been using

// Here we create the BAQDataView same as https://codesnips.fortirisgroup.com/snippet/baq-data-views/ with 2 additions
private void CreatePartsListBAQView() {
    // create the baq view and add it to the transaction
    bdvPartsList = new BAQDataView("WCI-CapResLnkParts");
    bdvPartsList.AddEnabled = true;                         // --- This allows new rows in the view
    bdvPartsList.AddText = "New Machine Part";              // --- This captions new button on toolbar
    oTrans.Add("PartsListView", bdvPartsList);
 
    // publish columns we'll bind to
    var capBinding = "CapResLnk.CapabilityID";
    var resBinding = "CapResLnk.ResourceID";
 
    oTrans.PublishColumnChange(capBinding, Guid.NewGuid().ToString());
    oTrans.PublishColumnChange(resBinding, Guid.NewGuid().ToString());
    var capPub = oTrans.GetPublisher(capBinding);
    var resPub = oTrans.GetPublisher(resBinding);
 
    bdvPartsList.SubscribeToPublisher(capPub.PublishName, "UD01_Key2");
    bdvPartsList.SubscribeToPublisher(resPub.PublishName, "UD01_Key3");
 
   // Add rules to make key columns read-only after save
   RowRule notNew =  new RowRule("RowMod", RuleCondition.NotEqual, "A");
   notNew.AddAction(RuleAction.AddControlSettings(oTrans, "PartsListView.UD01_Key4", SettingStyle.ReadOnly));
   notNew.AddAction(RuleAction.AddControlSettings(oTrans, "PartsListView.UD01_Key5", SettingStyle.ReadOnly));
   bdvPartsList.AddRowRule(notNew);
}

The new row stuff you can pull out of there and the row rules but everything in the middle should be good. What are you seeing as a result of this again? You said the field is populating but not for each material?

2 Likes

Brilliant! Got it working, Thank you very much!

public void CreateLateBAQView()
	{
		baqViewLate = new BAQDataView("TESTJG");
		oTrans.Add("TESTJGPOBAQ",baqViewLate);
		
		string pubBinding = "JobHead.JobNum";
		string pubBinding2 = "JobMtl.MtlSeq";

		
        oTrans.PublishColumnChange(pubBinding, Guid.NewGuid().ToString());
    	oTrans.PublishColumnChange(pubBinding2, Guid.NewGuid().ToString());

		var pub = oTrans.GetPublisher(pubBinding);
    	var pub2 = oTrans.GetPublisher(pubBinding2);

		baqViewLate.SubscribeToPublisher(pub.PublishName, "JobMtl_JobNum");
		baqViewLate.SubscribeToPublisher(pub2.PublishName, "PORel_JobSeq");

	}