UD field mapping help

I’m trying to set the Contract ID field for an updateable dashboard. In the Job entry screen, when you uncheck the link to contract box, the contract ID is cleared out, and when you check it, it adds the contract ID that is in the job head. When I do that with the UD dashboard, the Contract ID is not cleared (or added), so I need to recreate that behavior. What’s the best way to do that? If I add the JobMtl.ContractID field in the query, there is the option for the query for object column mapping and I can put in a mapping using C#. I suck at C# so that’s tough for me, and there’s not helpful conditions like there are in other places. Would it be better for me to make a calculated field so I can use the SQL editor, and map to the calculated field? Or will just look at the existing field instead of the changed field?

Basically this is what I need, but it has to be based on what the link to contract field is being changed to.

(case when JobMtl.LinkToContract = true then JobHead.ContractID else '' end)

It would be nice if I could add a data directive, however I don’t think I can easily grab the JobHead contractID when I’m working with JobMtl table.

I’ll play around with it and do some trial and error. But if anyone has any tips, that would be awesome.


I just made a BPM on pre-processing for the update method specific to this BAQ. The BPM uses the same logic listed above. I forgot about this when asking the question.

It’s probably a bit of overkill in this case, however, you could trace the updating of the field on the standard form and use the same methods. I can’t guarentee it, but the the adding/clearing of contractID may be performed by the methods.
In this case, the methods are:

  • Erp.Proxy.BO.JobEntry.ValidateLinkToContractData
  • Erp.Proxy.BO.JobEntry.ChangeJobMtlLinkToContract

For these, you would have to setup the JobEntryDataSet, for which you can use method:

  • Erp.Proxy.BO.JobEntry.GetDatasetForTree