web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Change column header text on overwrote lookup.

(0) ShareShare
ReportReport
Posted on by 1,450

I've overwritten the lookup method on a field to customize and filter the results. However, I'm trying to have the DeliveryDate as a column and the text is bringing back the default text of "Date". I'd like for it to be more specific. How does one change the text in x++? Included before is my current code. Thanks!

public void lookup()
{
    SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(VendPackingSlipTrans),this);
    Query query = New Query();
    QueryBuildDataSource queryBuildDataSource = query.addDataSource(tableNum(VendPackingSlipTrans));
    QueryBuildRange qbrTransId, qbrFullyMatched, qbrQty;
    ;
    sysTableLookup.addLookupfield(fieldNum(VendPackingSlipTrans, PackingSlipId),true);
    sysTableLookup.addLookupfield(fieldNum(VendPackingSlipTrans, DeliveryDate),false);

    queryBuildDataSource.addSortField(fieldNum(VendPackingSlipTrans, PackingSlipId));
    qbrTransId = queryBuildDataSource.addRange(fieldNum(VendPackingSlipTrans, InventTransId));
    qbrFullyMatched = queryBuildDataSource.addRange(fieldNum(VendPackingSlipTrans, FullyMatched));
    qbrQty = queryBuildDataSource.addRange(fieldNum(VendPackingSlipTrans, Qty));
    qbrTransId.value(queryValue(POInvoiceIntegration.TradeInventTransId));
    qbrFullyMatched.value(queryValue(NoYes::No));
    qbrQty.value(queryValue(POInvoiceIntegration.PurchQty));

    sysTableLookup.parmQuery(query);
    sysTableLookup.performFormLookup();
    //super();
}


*This post is locked for comments

I have the same question (0)
  • Verified answer
    Ivan (Vanya) Kashperuk Profile Picture
    on at

    The label is picked up automatically, in this case based on the extended data type for the field DeliveryDate on VendPackingSlipTrans table.

    The best thing to do would be to update the EDT reference to something more descriptive then TransDate, which is the current setting there.

    Alternatively, you could update the Label property on this field in the table

    Both would of course impact the entire system where this field is used, but I think that would actually be a plus in this particular case.

  • KCDeVoe Profile Picture
    1,450 on at

    I didn't even realize that Delivery date didn't have a label set in the VendPackingSlipTrans table. I updated it to Delivery date and it looks fine now.

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans