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 ?
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?
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.
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
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?