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 2

  // 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

I have the same question (0)
  • GirishS Profile Picture
    27,833 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 583 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 378

#3
Diego Mancassola Profile Picture

Diego Mancassola 255

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans