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 :
Service | Customer Service, Contact Center, Fie...
Unanswered

We want to filter the Products on purchase order

(0) ShareShare
ReportReport
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 = 0; i < results.value.length; i++) {
                    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
    35 on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Daniyal Khaleel Profile Picture

Daniyal Khaleel 62 Most Valuable Professional

#2
11manish Profile Picture

11manish 23 Super User 2026 Season 2

#3
Travis South Profile Picture

Travis South 10

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans