Hello,
I am working on a customization to replace the basic search of the Inspection Processing Form with my own quick search. I made a BAQ and quick search which I invoke in my customization and I am able to populate the form for all Tran Types accordingly except for RMAs. I am able to use the inspection processing adapter methods like GetFirstArtByID, GetReceiptByID, and Get ID to retrieve and update the form for PO Receipts, Inventory, Operation, Job Materials, and Subcontract, however, I can’t find a method to get RMAs. Anyone have any tips?
Thanks
private void InspectionProcessingEntryForm_BeforeToolClick(object sender, Ice.Lib.Framework.BeforeToolClickEventArgs args)
{
if(args.Tool.Key == this.qsName)
{
// Launch quick search
object response = ProcessCaller.InvokeAdapterMethod(
oTrans.EpiBaseForm,
"QuickSearchAdapter",
"ShowQuickSearchForm",
new object[]{
oTrans.EpiBaseForm,
"InspProcQSv1",
true,
new DataTable()
}
);
// User cancelled
if (response == null) return;
// Retrieve selected rows
ArrayList list = (ArrayList)response;
// Handle multi selections
for(int i = 0; i <list.Count; i++)
{
// The return val is a calculated field from the quick search BAQ which will contain the tran type and key fields based on the tran type.
string returnVal = list[i].ToString();
char delimiter = '|';
string[] keyVals = returnVal.Split(delimiter);
string tranType = keyVals[0];
// Handle each tran type accordingly
switch(tranType)
{
case "PO Receipts":
int vendorNum = int.Parse(keyVals[1]);
string purPoint = keyVals[2];
string packSlip = keyVals[3];
int packLine = int.Parse(keyVals[4]);
MessageBox.Show(string.Format("{0} {1} {2} {3}", vendorNum, purPoint, packSlip, packLine));
inspProcAdapter.GetReceiptByID(vendorNum, purPoint, packSlip, packLine);
oTrans.NotifyAll();
break;
case "Inventory":
case "Operation":
case "Job Materials":
case "Subcontract":
int tranID = int.Parse(keyVals[1]);
inspProcAdapter.GetByID(tranID);
oTrans.NotifyAll();
break;
case "First Articles":
string jobNum = keyVals[1];
int assemblySeq = int.Parse(keyVals[2]);
int oprSeq = int.Parse(keyVals[3]);
string resourceID = keyVals[4];
int seqNum = int.Parse(keyVals[5]);
inspProcAdapter.GetFirstArtByID(jobNum, assemblySeq, oprSeq, resourceID, seqNum);
oTrans.NotifyAll();
break;
case "RMAs":
int rmaNum = int.Parse(keyVals[1]);
int rmaLine = int.Parse(keyVals[2]);
int rmaReceipt = int.Parse(keyVals[3]);
break;
default:
break;
}
}
}
}