Skip to main content
Answer

Creating a dataview based on a custom field

  • February 15, 2022
  • 1 reply
  • 410 views

Forum|alt.badge.img+7

I know that I can do what I want with custom fields but I’m wondering if there’s a way I can do this with a dataview.

I’ve added Contract Item to Cases. The Contract Item is one of the contract detail items based on the Case Contract field. No problems there.

I want to display some field values from the Contract Detail record and from some attributes associated with the Contract Detail’s recurring item (which is a non-stock item record).

I was starting with my graph extension and was going to add a simple data view along the lines of:

  public PXSelect<ContractDetail
      ,Where<ContractDetail.contractItemID
          ,Equal<Current<CRCase.usrContractItemID>>
          ,And<ContractDetail.contractID
            ,Equal<Current<CRCase.contractID>>
          >
      >
      >  CurrentContractItem;

But CRCase doesn’t contain usrContractItemID since that field comes from my DAC extension.

Can I create a data view this way in my graph extension?  Or do I have to create the data view with a parameter and then somehow refresh the data view after I have retrieved the case record or updated the contract item no field?

Best answer by Naveen Boga

Hi @ddunn  usrContractItemID is extension DAC filed of CRCase? 

If yes, you can mention your extended DAC name instead of CRCase, like below.

public PXSelect<ContractDetail,Where<ContractDetail.contractItemID , Equal<Current<CRCaseEXT.usrContractItemID>>, And<ContractDetail.contractID
, Equal<Current<CRCase.contractID>>>>> CurrentContractItem;

 

1 reply

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • Answer
  • February 16, 2022

Hi @ddunn  usrContractItemID is extension DAC filed of CRCase? 

If yes, you can mention your extended DAC name instead of CRCase, like below.

public PXSelect<ContractDetail,Where<ContractDetail.contractItemID , Equal<Current<CRCaseEXT.usrContractItemID>>, And<ContractDetail.contractID
, Equal<Current<CRCase.contractID>>>>> CurrentContractItem;