Problem in GetNewIssueReturn, I need a movement "STK-SHP"

customization

(Jose de Jesus Jacome Nieto) #1

Hi, I need to perform a “SHT-SHP” move but in the adapterIssueReturn.GetNewIssueReturn method (pcTranType, pcMtlQueueRowid, pcCallProcess); I do not know what pcCallProcess is.

Anyone have any idea

Thanks.

                                          string Secuencia="207036"; 

					/*Local Variables*/				
					bool userInput = false;
					string legalNumberMsg = string.Empty;
					string partTranPKs = string.Empty;	
		                        string IssueReturnTs;
					bool more;
					DataSet mtlDatos = new DataSet();
					MaterialQueueAdapter tranAdapter = new MaterialQueueAdapter(this.oTrans);
					tranAdapter.BOConnect();

					SearchOptions optsTrans = new SearchOptions(SearchMode.AutoSearch); 
					optsTrans.PageSize = 0; 
					string whereTrans = string.Format("MtlQueueSeq = " + Secuencia + " and TranStatus <> 'HOLD' BY PartNum"); 
					optsTrans.NamedSearch.WhereClauses.Add("MtlQueue",whereTrans); 							
					mtlDatos = tranAdapter.GetRows(optsTrans,out more);							

	                if (mtlDatos != null)
	                {
						IssueReturnAdapter adapterIssueReturn = new IssueReturnAdapter(oTrans);
						adapterIssueReturn.BOConnect();

						string msg;
				        bool reqInput;
				        string lgl;
				        string partTran;
	                    
						adapterIssueReturn.GetNewIssueReturn("STK-SHP", Guid.Empty, "");
	
	                    if (mtlDatos.Tables[0].Rows != null)
	                    {	
							foreach (DataRow row in mtlDatos.Tables[0].Rows)
						   {
								MessageBox.Show(row["MtlQueueSeq"].ToString());	
								adapterIssueReturn.IssueReturnData.IssueReturn[0].TranQty = (decimal)Convert.ToDouble(row["Quantity"].ToString());//Cantidad Quantity
								adapterIssueReturn.IssueReturnData.IssueReturn[0].PartNum= (string)row["PartNum"].ToString();
								adapterIssueReturn.IssueReturnData.IssueReturn[0].OrderNum = (int)Convert.ToInt32(row["OrderNum"].ToString());
								adapterIssueReturn.IssueReturnData.IssueReturn[0].OrderLine = (int)Convert.ToInt32(row["OrderLine"].ToString());
								adapterIssueReturn.IssueReturnData.IssueReturn[0].OrderRel = (int)Convert.ToInt32(row["OrderRelNum"].ToString());
								adapterIssueReturn.IssueReturnData.IssueReturn[0].FromWarehouseCode = (string)row["FromWhse"].ToString();
								adapterIssueReturn.IssueReturnData.IssueReturn[0].FromBinNum = (string)row["FromBinNum"].ToString();
								adapterIssueReturn.IssueReturnData.IssueReturn[0].ToWarehouseCode = (string)row["ToWhse"].ToString();
								adapterIssueReturn.IssueReturnData.IssueReturn[0].ToBinNum = (string)row["ToBinNum"].ToString();
								adapterIssueReturn.IssueReturnData.IssueReturn[0].UM =(string)row["IUM"].ToString();
															
						   }

							//Movimiento
							adapterIssueReturn.PrePerformMaterialMovement(out userInput);								
							adapterIssueReturn.PerformMaterialMovement(false, out legalNumberMsg, out partTranPKs);
							
							/*Cleanup adapters*/
							adapterIssueReturn.Dispose();
							
					 	   MessageBox.Show("Proceso terminado.");
	                    }
					    else
					    {
					 		MessageBox.Show("Error: No se encontro el articulo seleccionado.");
					    }

(Chris Conn) #2

If you run a trace it should show you. As I recall, it was “CustShipEntry” but dont trust me, trust a trace.


(Jose de Jesus Jacome Nieto) #3

How i run a trace or where? You say me it was maybe
“CustShipEntry” is te value of pcCallProcess?
Thanks


(Chris Conn) #4

Also, the guide: https://epicweb.epicor.com/doc/Docs/EpicorICETools_UserGuide_102100.pdf#search=ice%20tools


(Jose de Jesus Jacome Nieto) #5

Thanks so much!! Now I know what is the parameter :smile:
But i do not know How I set value to parameter “Guid”

-----> Guid sysRowId=?;

adapterIssueReturn.GetNewIssueReturn("",Guid, “MaterialQueue”);

Thanks


(Jose de Jesus Jacome Nieto) #6

Thanks, the correct is
Guid parameter=new Guid(“Value”);


(Joseph Moeller) #7

If you’re generating a new GUID, it’s Guid sysRowId = Guid.NewGuid(); use this one
If you’re generating a purposefully empty GUID, it’s Guid myEmptyGuid = new Guid();

I believe if you use the string overload for the Guid constructor, you’ll need specify some guid formatting which is only going to be correct if you specify the standard formatting.