Skip to main content
Solved

How to access UDF on other screen.

  • 18 June 2024
  • 5 replies
  • 56 views

I created string type attribute and used on Purchase Orders screen.

Attributes
UDF Fields on Purchase Orders Screen

Requirement: I want to display this on Bills and Adjustment screen.

A.) Able to do: We can easily add on ADD PO popup.

B.) Query: But not able to find any way to display on ADD PO LINE popup or on Details Grid

ADD PO | ADD PO LINE | DETAILS grid

Fyi, On Details screen PO Number field is present.

PO Number is Present on Bills and Adjustment details grid.

Requirement is very simple. UDF fields on POOrder should be displayed on various other place. 

Hello @bjani23,

This would require customization in order to push the value you gave the UDF on the PO to carry over to the Bill.

 

Hope this helps.


Hello @bjani23,

This would require customization in order to push the value you gave the UDF on the PO to carry over to the Bill.

 

Hope this helps.

Yes I am trying to make change using code. But I cannot find any help that show me how can we get attribute value.

Basically on Bills and Adjustment screen we have PO number. Base on that I wants to pull attribute value. 


The Detail lines of the Bills and Adjustments screen are from the APTran DAC:

 

You would need to extend this DAC and add an unbound field. You could use a FieldSelecting event handler to lookup the value from the PONbr in that line.

Rather than using attributes, I would suggest going all in on custom fields and adding a bound field to POOrder. This will serve you better and with less complications.


The Detail lines of the Bills and Adjustments screen are from the APTran DAC:

 

You would need to extend this DAC and add an unbound field. You could use a FieldSelecting event handler to lookup the value from the PONbr in that line.

Rather than using attributes, I would suggest going all in on custom fields and adding a bound field to POOrder. This will serve you better and with less complications.

Yes, I know if we wants to add any column we need to extend DAC.

But I am searching code that pull data from attribute.

For new development yes we can go with custom fields but sometimes we need to extend existing development. UDF already present. Now we just need to display.


...sometimes we need to extend existing development. UDF already present.

We’ve all been there.

 

Try something like this in your FieldSelecting event for the APTran extension field:

protected virtual void _(Events.FieldSelecting<APTranExt.usrProNbr> e)
{
APTran row = e.Row;
if (row is null) return;

var purchaseGraph = PXGraph.CreateInstance<PurchaseOrderEntry>();
POOrder order = purchaseGraph.Document.Search<POOrder.orderNbr>(row.PONbr, row.POOrderType);

var udfValue = purchaseGraph.Document.Cache.GetValueExt(order, "AttributePRONBR") as PXStringState;

e.ReturnValue = udfValue;
}

 


Reply