Hey,
Anyone launched the Call Log Entry from a customization?
All my info getting to the assignment to lfoDict (case number, task sequence, etc.) is good, but I’m not getting the arguments passed in correctly.
The call log entry launches, but gets an error on a malformed whereclause in CRMCall GetRows:
Server Side Exception
A server error occurred. Review the server event logs for details.
Exception caught in: Epicor.ServiceModel
…
Client Stack Trace
at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Erp.Proxy.BO.CRMCallImpl.GetRows(String whereClauseCRMCall, String whereClauseCRMCallAttch, String whereClauseCRMCallCnt, String whereClauseCRMCallHistory, Int32 pageSize, Int32 absolutePage, Boolean& morePages)
at Erp.Adapters.CRMCallAdapter.OnGetRows(SearchOptions opts, Boolean& MorePages, String[] whereClauses)
at Ice.Lib.Framework.EpiBaseAdapter.GetRows(SearchOptions opts, Boolean& morePages)
The call log screen displays after the error, but it’s empty.
Here’s the customization code:
string taskSeqNum = this.grdOVTask.ActiveRow.Cells["TaskSetSeq"].Value.ToString();
if(edvHDCase != null && edvHDCase.SelectedRow != null &&
!String.IsNullOrEmpty(edvHDCase.SelectedRow["HDCaseNum"].ToString()) && taskSeqNum != "0")
{
string hdCaseNum = edvHDCase.SelectedRow["HDCaseNum"].ToString();
string custNum = edvHDCase.SelectedRow["CustNum"].ToString();
string custName = edvHDCase.SelectedRow["CustomerName"].ToString();
Dictionary<String, String> lfoDict = new Dictionary<String, String>();
lfoDict["Key1"] = "HDCase";
lfoDict["CallCustNum"] = custNum;
lfoDict["CallCustomerName"] = custName;
lfoDict["Key2"] = hdCaseNum;
lfoDict["Key3"] = taskSeqNum;
lfoDict["RelatedToFile"] = "TASK";
//string[] valueIn = {"HDCase", custNum, custName, hdCaseNum, taskSeqNum, "task"}; // tried this a couple of ways with a dictionary and a string array
// “the internet” said they might be in this order
LaunchFormOptions lfo = new LaunchFormOptions();
//lfo.ContextValue = lfoDict;
lfo.ValueIn = lfoDict;
//lfo.ValueIn = valueIn;
ProcessCaller.LaunchForm(oTrans, "CRGO6100", lfo);
}
Below are portions of the trace from running the call log from the standard Task Detail sheet and from a button on the custom sheet.
Good trace run from Task Detail sheet:
<tracePacket>
<businessObject>Erp.Proxy.BO.CRMCallImpl</businessObject>
<methodName>GetRows</methodName>
<appServerUri>net.tcp://dnp-paepiapp/ERP10V/</appServerUri>
<returnType>Erp.Tablesets.CRMCallTableset</returnType>
<localTime>10/15/2019 17:23:57:6632783 PM</localTime>
<threadID>1</threadID>
<executionTime total="4485" roundTrip="718" channel="0" bpm="3734" other="33" />
<retries>0</retries>
<parameters>
**<parameter name="whereClauseCRMCall" type="System.String"><![CDATA[RelatedToFile = 'task' AND Key1 = 'HDCase' AND Key2 = '90600' AND Key3 = '20' BY CRMCall.OrigDate DESC, CRMCall.OrigTime DESC]]>**</parameter>
Bad trace run from custom sheet:
<tracePacket>
<businessObject>Erp.Proxy.BO.CRMCallImpl</businessObject>
<methodName>GetRows</methodName>
<appServerUri>net.tcp://dnp-paepiapp/ERP10V/</appServerUri>
<returnType>Erp.Tablesets.CRMCallTableset</returnType>
<localTime>10/15/2019 17:26:45:6667592 PM</localTime>
<threadID>1</threadID>
<executionTime total="154" roundTrip="152" channel="0" bpm="0" other="2" />
<retries>0</retries>
<parameters>
**<parameter name="whereClauseCRMCall" type="System.String"><![CDATA[(RelatedToFile = 'customer' AND Key1 = '' AND Key2 = '' AND Key3 = '') OR ( CallCustNum = ) BY CRMCall.OrigDate DESC, CRMCall.OrigTime DESC]]></parameter>**
There are oTrans methods for lots of the actions in Case Entry, but not for the call log. In developer mode one hits this customization prompt for menu CRGO6100 (from standard or custom buttons):
Any ideas?
Thanks,
Joe