Skip to Content

ByD KUT field query parameter but no retriction

Hello all,

We implemented in CustomerQuote BO a KUT field for "Original_Quote" for migration from legacy to keep old customer "contract" number. This field has been made available for search (in quote object generic search - enterprise search)

In CustomerContract BO (service contract), the field is also available, but contract are loaded without reference to quote : a second specific field is availlable to put the quote refeence, which is the Bydesign quote number.

To overcome the situation, we tried to implement a small ABSL script in customerContrat extension to search from the filled OriginalQuote field the internal CustomerQuote ID.

CustomerQuote is declared as "Reference to Customer-Specific Fields". we can declare a variable for CustomerQuote, and initiate a query on it. Field Original_Quote is available to be added as a query restriction.

We even have it twice (I suspect an other extension referencing same field (OriginalQuote_2FKX8V4V3X861I2KI0F4H6SII and OriginalQuote_2W9H20UMMUKXCCV9SP3YRM4PO) but same result on both fields :

the query with the restriction returns all records from the DB!

Do you know why the query is not considering it or if something else is required ?

Here is an extract of the coding in event after-modify on contract root object extension.

var lquote : CustomerQuote;
var lquery = lquote.QueryByElements;
var lqueryParams = lquery.CreateSelectionParams();


if (this.QuoteReference == "")
	if (this.OriginalQuote != "")
	{
     
		lqueryParams.Clear();
		lqueryParams.Add(lquery.OriginalQuote_2FKX8V4V3X861I2KI0F4H6SII, "I", "EQ", this.OriginalQuote);
		var lqueryResults = lquery.Execute(lqueryParams);
		if (lqueryResults.Count() > 0)
		{
			this.QuoteReference = lqueryResults.GetLast().ID.content.TrimLeft("0");
		}
	}
}
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 17 at 01:36 PM

    Hi Pierre,

    Is this still an issue for you?

    Kind regards,

    Adrian

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.