Search criteria not working inside custom widget

Search criteria not working inside custom widget

Hi all,

I tried to use search criteria inside of a custom widget to get a specific record from a custom module but got the error message:
message: "Value for url is too long" 
I wonder is there a way to use search criteria inside a custom widget? Thanks in advance!

reference:

code snippet:
  1. // Build search criteria to filter for specific config record
    const searchCriteria = {
    "list_info": {
    "search_criteria": {
    "field": this.config.FIELD_NAME_KEY,
    "condition": "is",
    "value": this.config.CONFIG_RECORD_NAME
    }
    }
    };

    const inputData = encodeURIComponent(JSON.stringify(searchCriteria));
    const fullUrl = `${this.apiBaseUrl}/${this.config.MODULE_API_NAME}?input_data=${inputData}`;
    //const fullUrl = `${this.apiBaseUrl}/${this.config.MODULE_API_NAME}`
    console.log("full url: ", fullUrl);
    const options = {
    url: fullUrl,
    method: "get",
    connectionLinkName: this.config.CONNECTION_NAME,
    headers: { "Accept": "application/vnd.manageengine.sdp.v3+json" }
    };

                  New to ADSelfService Plus?