Skip to main content

Notifications

Service | Customer Service, Contact Center, Fie...
Unanswered

We want to filter the Products on purchase order

Posted on by 35

Hi there,

we want to achieve the functionality in which I want to filter the product lookup according to the vendor lookup. there is the N:N relationship between the two, to achieve this functionality I have written the javaScript where we are fetching the records of product as per vendors.

The Problem i am facing is, that my javaScript is extracting the products but when i am attaching it with the product lookup, it is showing an error that 0x80072500 Invalid URI: The Uri string is too long.

it might be possible because of the large number of products that are coming up in my results, so how do I resolve it .

Here is my FetchXml in script which i am using,

fetchXml = "<filter type ='or'>";
                for (var i = 0i < results.value.lengthi++) {
                    var product = results.value[i]["_fwh_product_value"];
                    if (product != null || product != undefined) {
                        //getting Vendors Products
                        fetchXml += "<condition attribute='productid' operator='eq' value='{" + product + "}'/>";
                    }
                }
                fetchXml += "</filter>";
                formContext.getControl("product").addCustomFilter(fetchXml);
Thanks!
 
  • Anubha Soni Profile Picture
    Anubha Soni 35 on at
    RE: We want to filter the Products on purchase order

    Hi,

    it is quite urgent please, respond to it.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans