AnsweredAssumed Answered

Assistance with backfill of contact information into an Incident

Question asked by andholmes on May 17, 2016
Latest reply on May 18, 2016 by jmayer

We are using SDM 14.1.02 and have a customization in the detail_in.htmpl that backfills customer data into an incident.  This works great as long as the field used to display the data in detail_in.htmpl is not read-only.  Every method we've tried to make it read-only has failed.  The data is either displayed in the field but not saved to the database or the data is not displayed at all.  This is the backfill code:

// TPMOD Incident Field Placement 4.3.1 Backfill Customer Data MS 20140205 START
function fill_related_fields()
{
zFID=document.forms["main_form"].elements["FID"].value;
zSID=document.forms["main_form"].elements["SID"].value;
var zcntID=document.forms["main_form"].elements["SET.customer"].value;
var zcntID=zcntID.replace("U","");
    zcntID=zcntID.replace("'","");
    zorg_id="";
zproc_id="";
  
if ((zcntID != "")&&("$args.z_internal" == "0"))
   {
   var url;
     if(ahdframe.currentAction==0) // =0 if customer selected from contact list; =6 if typed in
     {
      set_action_in_progress(ACTN_AUTOFILL);
     }

  fill_build_url_display("cnt", "userid", "fill_cnt_customernumber", "QBE.EQ.id="+escape(zcntID));
  //Move to the next field to validate to prevent save delays from recalculation.
  jQuery("input[name=requested_by_combo_name]").focus();
}
else
   {
  fill_set_display_value(true, "custnum", "");
   }
}

function fill_cnt_customernumber(persid, value, rel_attr_val)
{
fill_set_display_value(true, "custnum", value);
//for BLI fill
fill_build_url_display("cnt", "z_customer_bli", "fill_cnt_BLICallback", "QBE.EQ.id="+escape(rel_attr_val));
}

function fill_cnt_BLICallback(persid, value, rel_attr_val)
{
fill_set_display_value(false, "z_billing_indicator", value);
//for SLI fill
fill_build_url_display("cnt", "z_customer_sli", "fill_cnt_SLICallback","QBE.EQ.id="+escape(rel_attr_val));
}

function fill_cnt_SLICallback(persid, value, rel_attr_val)
{
fill_set_display_value(false, "z_service_level_ind", value);
//for organization fill
fill_build_url_display("cnt", "organization", "fill_cnt_organization","QBE.EQ.id="+escape(rel_attr_val));
}

function fill_cnt_PccCallback(persid, value, rel_attr_val)  //PCC fill
{
fill_set_display_value(false, "z_cust_pcc", value);
//for prioritization process fill
fill_build_url_display("org", "z_prioritization_process", "fill_org_prioritizationprocess","QBE.EQ.id="+escape(zorg_id));
}

function fill_cnt_organization(persid, value, rel_attr_val)
{
set_action_in_progress(0);
zorg_id = value;
//for organization name fill
fill_build_url_display("cnt", "organization.name", "fill_cnt_organizationname","QBE.EQ.id="+escape(rel_attr_val));
}

function fill_cnt_organizationname(persid, value, rel_attr_val)
{
if (zorg_id != "")
{
  fill_set_display_value(true, "custorg", value);
}
//for PCC fill
fill_build_url_display("z_iatasid", "pcc", "fill_cnt_PccCallback","QBE.EQ.customer="+escape(rel_attr_val)+"+QBE.EQ.primarysidind=Y");
}

function fill_org_prioritizationprocess(persid, value, rel_attr_val)
{
if (zorg_id != "")
{
  fill_set_display_value(false, "z_prioritization_process", value);

}

//for prioritization process value
fill_build_url_display("org", "z_prioritization_process.z_input_value1", "fill_org_prioritizationprocessname","QBE.EQ.id="+escape(zorg_id));
}

function fill_org_prioritizationprocessname(persid, value, rel_attr_val)
{
if (zproc_id != "")
{
  fill_set_display_value(true, "priprocess", value);
}

//for prioritization priority fill
fill_build_url_display("org", "z_prioritization_priority", "fill_org_prioritizationpriority","QBE.EQ.id="+escape(zorg_id));

}

function fill_org_prioritizationpriority(persid, value, rel_attr_val)
{
if (zorg_id != "")
{
  fill_set_display_value(false, "z_prioritization_priority", value);
}
}

// TPMOD Incident Field Placement 4.3.1 Backfill Customer Data MS 20140205 END

 

 

This is where we display the fields.  Billing Indicator and SLI we want to be read-only.  Prioritization Process doesn't save the value to the database if the field is read-only even though it displays the value on the form.

<PDM_MACRO name=dtlStartRow>

<PDM_MACRO name=dtlReadonly hdr="Customer Number" attr="customer.userid" id="custnum">

<PDM_MACRO name=dtlTextbox hdr="Billing Indicator" attr=z_billing_indicator id="bli">

<PDM_MACRO name=dtlTextbox hdr="SLI" attr=z_service_level_ind id="sli">

<PDM_IF "$cst.z_capabilities.a1" == 1 || "$SESSION.ROLE_ID" == 400056 >

<PDM_MACRO name=dtlDropdown hdr="Prioritization Process" attr="z_prioritization_process" whereclause="z_process_name = 'SDM Picklist' and z_type = 'CR Prioritization Process' and delete_flag = 0">

<PDM_ELSE>

<PDM_MACRO name=dtlReadonly hdr="Prioritization Process" attr="z_prioritization_process.z_input_value1" colspan="1" id="priprocess">

</PDM_IF>

 

Does anyone have any ideas?

Outcomes