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


(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


                                          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);

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

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

						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)
								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();

							adapterIssueReturn.PrePerformMaterialMovement(out userInput);								
							adapterIssueReturn.PerformMaterialMovement(false, out legalNumberMsg, out partTranPKs);
							/*Cleanup adapters*/
					 	   MessageBox.Show("Proceso terminado.");
					 		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?

(Chris Conn) #4

Also, the guide:

(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”);


(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.