" /> How to set CustomField in a record of calling list for GAD customization? - Genesys CTI User Forum

Author Topic: How to set CustomField in a record of calling list for GAD customization?  (Read 3104 times)

Offline kevinwang

  • Full Member
  • ***
  • Posts: 159
  • Karma: 0
Advertisement
I can not setcustomfield using myOutboundRecord.setCustomField(), these codes used to work in 7.6 ocs,
I upgraded our ocs from 7.6 to 8.0, then they don't  work in 8.0 ocs.


what's wierd is I can getCustomfield, setCallResult, setTimeZone etc,
but all values from get custom field are Null.
Then I checked ail source code about method 'setcustomfield',


public void setCustomField(String _fieldName, Object _value) throws RequestFailedException
/*    */  {
/* 401 */    setCustomField(_fieldName, _value, true);
/*    */  }
/*    */
/*    */  public void setCustomField(String _fieldName, Object _value, boolean _update)
/*    */    throws RequestFailedException
/*    */  {
/* 408 */    Object currentFieldValue = this.mCustomFields.get(_fieldName);
/* 409 */    if (currentFieldValue == null) {
/* 410 */      this.sLog.warn("Can't set custom field: field " + _fieldName + " unknown");
/* 411 */      throw new InvalidParameterException("_fieldname", _fieldName, "Unknown custom field");
/*    */    }
/*    */
/* 414 */    if (_value == null) {
/* 415 */      this.sLog.warn("Can't set custom field: value is null");
/* 416 */      throw new InvalidParameterException("_value", null, "Null custom field");
/*    */    }
/*    */
/* 419 */    if (!currentFieldValue.getClass().isInstance(_value)) {
/* 420 */      this.sLog.warn("Can't set custom field: field " + _fieldName + " has not the correct type");
/* 421 */      throw new InvalidParameterException("_fieldname", _fieldName, "Incorrect type for the custom field");


only when currentFieldValue == null is true, there will be error message: unknown custom field.
so, it seems the reason is clear, but why the these custom field values are null?
I am very sure the values of these field in database not null, even some field can not be null.




The following is error message from jsp code.

org.apache.jasper.JasperException: Exception in JSP: /custom/disposition-codes-view.jsp:33

30:    OutboundRecord myOutboundRecord = myOutboundChain.getActiveRecord();
31:    Integer wrapUpCode = new Integer(5);
32:    String aaa = "aaaaa";
33:    myOutboundRecord.setCustomField("WrapUpCode",wrapUpCode);
34:  //myOutboundRecord.setCustomField("Customer_name","kevin");
35:    myOutboundRecord.setTimeZone("EST");
36:


Stacktrace:
  org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  com.genesyslab.uadthin.filter.CachePreventFilter.doFilter(CachePreventFilter.java:30)
  com.genesyslab.uadthin.filter.UTF8Filter.doFilter(UTF8Filter.java:127)


root cause

javax.servlet.ServletException: Unknown custom field
  org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
  org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
  org.apache.jsp.custom.disposition_002dcodes_002dview_jsp._jspService(disposition_002dcodes_002dview_jsp.java:185)
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  com.genesyslab.uadthin.filter.CachePreventFilter.doFilter(CachePreventFilter.java:30)
  com.genesyslab.uadthin.filter.UTF8Filter.doFilter(UTF8Filter.java:127)


root cause

com.genesyslab.ail.exception.InvalidParameterException: Unknown custom field
  com.genesyslab.ail.core.outbound.OutboundRecordImpl.setCustomField(OutboundRecordImpl.java:411)
  com.genesyslab.ail.core.outbound.OutboundRecordImpl.setCustomField(OutboundRecordImpl.java:401)
  org.apache.jsp.custom.disposition_002dcodes_002dview_jsp._jspService(disposition_002dcodes_002dview_jsp.java:87)
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  com.genesyslab.uadthin.filter.CachePreventFilter.doFilter(CachePreventFilter.java:30)
  com.genesyslab.uadthin.filter.UTF8Filter.doFilter(UTF8Filter.java:127)


Offline kevinwang

  • Full Member
  • ***
  • Posts: 159
  • Karma: 0
Nobody experienced this kind of issue?


Kevin

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Hi Kevin,

I've never seen such error so it might be some incompatibility between OCS 8.0 and SDK 7.6 or just a bug. You should raise a ticket with Genesys TechSupport.

In the meantime I would try SDK 8.0.

R.

Offline kevinwang

  • Full Member
  • ***
  • Posts: 159
  • Karma: 0
I also upgrade gad to latest version 76300.., ithe release note of which mentions modification and correction about ocs 8.0 compatiblity, but the issue still exists.

maybe I should try sdk 8.0,

Thank you , Rene.

Kevin

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Sorry, I forgot you're talking about GAD. In that case, let's open ticket with Genesys TechSupport as it seems to be a bug in AIL...

R.