Page 1 of 1

Problem with UDF Web Service

Posted: Mon Mar 27, 2023 12:26 pm
by mwalter
I developed a UDF to return some info. I tested it with SoapUI. Works fine. I put a call to the UDF in a javascript file and load that JS file in my display file. If I use that file/program, I can debug the UDF program fine and it returns a good success. However, in the javascript, the response object is null. I've done this scores of times and never had an issue. Here is the JS code.

Code: Select all

function getItemData(itemNumber) {
    debugger;
    var itm = itemNumber.toUpperCase();
	ajaxJSON({
		url: "/profoundui/universal/cmtGetItemInfoTest",
		params: {
		itemNumber:itm
		},
		method: "get",
		async: false,
		handler: function(ob) {
	      //alert("Success = " + ob.success);
		  if (ob.success) {
			  changeElementValue("txtItemDesc",ob.itemDescription);
              changeElementValue("txtEnableExclusive",ob.EnableExcl);
              applyProperty("TextBox2","set focus","true");
              applyProperty("TextBox2","field type","textbox");
		  }
		  else {
		    pui.errorTip(getObj("TextBox1"),ob.message,0);
		  }
		}  
		});	    
}


Re: Problem with UDF Web Service

Posted: Mon Mar 27, 2023 1:21 pm
by mwalter
Returned bad JSON. That was the issue.