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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

No data Is selected by query please help

(0) ShareShare
ReportReport
Posted on by 6

  // 1 AP
        priceDiscAdmTrans = this.priceDiscAdmTransSiteWise(#Site1, inventTable);
        inventDim = inventDim::find(priceDiscAdmTrans.InventDimId);

        if (priceDiscAdmTrans.RecId)
        {
            this.RLPAP        = priceDiscAdmTrans.OABRLP;
            this.InventSiteAP = inventDim.InventSiteId;
            this.PricePerPcsAP = priceDiscAdmTrans.Amount;
            this.CreatedDateAP = priceDiscAdmTrans.FromDate;
        }

here pricediscadmtrans is being called by function , here debugger is not going inside if condition 

 public PriceDiscAdmTrans priceDiscAdmTransSiteWise(InventSiteId _inventSiteId, InventTable inventTable)// Inventdim inventdim)
    {
        PriceDiscAdmTrans   priceDiscAdmTrans;
        InventDIm           inventDim;

        select firstonly inventDim
            where inventDim.InventSiteId == _inventSiteId;

        select firstonly priceDiscAdmTrans
            where priceDiscAdmTrans.ItemCode        == PriceDiscProductCodeType::Table
                && priceDiscAdmTrans.ItemRelation   == inventTable.ItemId
                && priceDiscAdmTrans.InventDimId    == inventDim.inventDimId
                && (priceDiscAdmTrans.FromDate      <= today()
                && (priceDiscAdmTrans.ToDate        == dateNull()
                || priceDiscAdmTrans.Todate         >= today()));
        //    join inventDIm
        //where inventDIm.inventDimId == priceDiscAdmTrans.InventDimId &&
        //     inventDIm.inventsiteid == _inventSiteId;

        return priceDiscAdmTrans;
    }

here pricediscadmtrans is returning no data

  • GirishS Profile Picture
    27,845 Moderator on at

    Hi sachin mittal,

    Date range you have added in the select statement for PriceDiscAdmTrans table is confusing.

    Can you tell me the data range where you want to get the data for?

    Also the 1st select statement you have written in InventDim returns a value?

    You need to debug the code and find out which lines in where condition causing them to return priceDiscAdmTrans as empty.

    Just comment out the lines on the where condition one by one and check whether its returning a buffer after commenting.

    Thanks,

    Girish S.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 284 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 213

#3
Subra Profile Picture

Subra 200 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans