Unfortunately, that must not be where I'm going wrong in that case. I'm
still getting the object reference not set to an instance of an object
error, so I'm guessing I'm forgetting to instantiate something...
Note this code is fired from an epiViewNotification of shipdtl. The
code prior to this populates the mandatory shipdtl fields.
Script:
Try
' snsView = CType(oTrans.EpiDataViews("snsView"), EpiDataView)
snsView.dataView.Table.Rows.Clear()
Dim row As DataRow = snsView.dataView.Table.NewRow()
row("ProcessToken") = "Shipment"
row("GenericToken1") = "ShipFrom=Manufacturing"
snsView.dataView.Table.Rows.Add(row)
MessageBox.Show("Added Row")
SNSearchAD.SerialNumberSearch(SNSearchAD.SerialNumberSearchData)
Dim whereClause As String =
snsView.dataView(0)("WhereClause").ToString().Replace("<<PartNum>>",
Dtl.dataView(Dtl.Row)("PartNum").ToString()).Replace("<<WarehouseCode>>"\
,
Dtl.dataView(Dtl.Row)("WarehouseCode").ToString()).Replace("<<BinNum>>",
Dtl.dataView(Dtl.Row)("BinNum").ToString())
Dim quantity As Integer =
Integer.Parse(Dtl.dataView(Dtl.Row)("OurJobShipQty").ToString())
If quantity <> 0 Then
Dim transType As String = "STK-CUS"
Dim partNum As String = Dtl.dataView(Dtl.Row)("PartNum").ToString()
Dim sourceRowID As String =
Dtl.dataView(Dtl.Row)("RowIdent").ToString()
Dim showAsModal As Boolean = True
MessageBox.Show("SN Search")
Dim SSNArgs As New
Epicor.Mfg.UI.App.SelectSerialNumbersEntry.SelectSerialNumbersArgs
Dim dataSet As DataSet =
DirectCast(SSNArgs.StartSelectedSerialNumbers(oTrans, partNum, quantity,
whereClause, transType, sourceRowID, oTrans.adapter.CustShipData,
showAsModal), DataSet)
MessageBox.Show("DataSet")
If dataSet IsNot Nothing Then
oTrans.adapter.CustShipData.SNFormat.Clear()
oTrans.adapter.CustShipData.Merge(dataSet, False,
MissingSchemaAction.Ignore)
If (Dtl.dataView(Dtl.Row)("RowMod").ToString() <> "U") or
(Dtl.dataView(Dtl.Row)("RowMod").ToString() <> "A") Then
Dtl.dataView(Dtl.Row).BeginEdit()
Dtl.dataView(Dtl.Row)("RowMod") = "U"
Dtl.dataView(Dtl.Row).EndEdit()
End If
End If
End If
Catch Ex As Exception
MessageBox.Show(ex.ToString(),"Serial Number Select Error")
End try
Else
oTrans.Update()
Thanks,
Steve
--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> The SNSView is a Serial Number view which is available in CustShip,
just
> look at it in the wizard.
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez>
<http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez>
<http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
>
> On Tue, Aug 14, 2012 at 4:41 AM, spmyers7582 smyers@... wrote:
>
> > **
> >
> >
> > Hi Jose,
> >
> > I've tried to integrate this code but I'm struggling with the
snsView. Is
> > this an EpiDataView of Serial Number Search? If so, how do I point
to that
> > view when in custship?
> >
> > Thanks,
> >
> > Steve
> >
> >
> > --- In vantage@yahoogroups.com, Jose Gomez jose@ wrote:
> > >
> > > Its a lot more complex than you thought here is the general
requirements,
> > > are you trying to call the same code that epicor has? or your own
custom
> > > one? Here is what you have to do to replicate what Epicor does,
ofcourse
> > > you have to change to your objects.,
> > >
> > > this.snsView.dataView.Table.Rows.Clear();
> > > DataRow row = this.snsView.dataView.Table.NewRow();
> > > row["ProcessToken"] = "Shipment";
> > > row["GenericToken1"] = "ShipFrom=Inventory";
> > > this.snsView.dataView.Table.Rows.Add(row);
> > >
> > >
> >
this.serialSearchAdapter.SerialNumberSearch(this.serialSearchAdapter.Ser\
ialNumberSearchData);
> > > string whereClause =
> > >
this.snsView.dataView[0]["WhereClause"].ToString().Replace("<<PartNum>>"\
,
> > >
> >
this.shipDtlView.dataView[this.shipDtlView.Row]["PartNum"].ToString()).R\
eplace("<<WarehouseCode>>",
> > >
> >
this.shipDtlView.dataView[this.shipDtlView.Row]["WarehouseCode"].ToStrin\
g()).Replace("<<BinNum>>",
> > >
this.shipDtlView.dataView[this.shipDtlView.Row]["BinNum"].ToString());
> > > int quantity =
> > >
> >
int.Parse(this.shipDtlView.dataView[this.shipDtlView.Row]["DisplayInvQty\
"].ToString());
> > > if (quantity != 0)
> > > {
> > > string transType = "STK-CUS";
> > > string partNum =
> > >
this.shipDtlView.dataView[this.shipDtlView.Row]["PartNum"].ToString();
> > > string sourceRowID =
> > >
this.shipDtlView.dataView[this.shipDtlView.Row]["RowIdent"].ToString();
> > > bool showAsModal = true;
> > > DataSet dataSet = (DataSet)
> > > SelectSerialNumbersArgs.StartSelectedSerialNumbers(this, partNum,
> > quantity,
> > > whereClause, transType, sourceRowID, this.adapter.CustShipData,
> > > showAsModal);
> > > if (dataSet != null)
> > > {
> > > this.adapter.CustShipData.SNFormat.Clear();
> > > this.adapter.CustShipData.Merge(dataSet, false,
> > > MissingSchemaAction.Ignore);
> > > if
> > >
((this.shipDtlView.dataView[this.shipDtlView.Row]["RowMod"].ToString()
!=
> > > "U") ||
> > >
(this.shipDtlView.dataView[this.shipDtlView.Row]["RowMod"].ToString() !=
> > > "A"))
> > > {
> > > this.shipDtlView.dataView[this.shipDtlView.Row].BeginEdit();
> > > this.shipDtlView.dataView[this.shipDtlView.Row]["RowMod"] =
> > > "U";
> > > this.shipDtlView.dataView[this.shipDtlView.Row].EndEdit();
> > > }
> > > }
> > > }
> > >
> > >
> > >
> > >
> > > *Jose C Gomez*
> > > *Software Engineer*
> > > *
> > > *
> > > *
> > > *T: 904.469.1524 mobile
> > > E: jose@
> >
> > > http://www.josecgomez.com
> > > <http://www.linkedin.com/in/josecgomez> <
> > http://www.facebook.com/josegomez>
> > > <http://www.google.com/profiles/jose.gomez> <
> > http://www.twitter.com/joc85>
> > > <http://www.josecgomez.com/professional-resume/>
> > > <http://www.josecgomez.com/feed/>
> > > <http://www.usdoingstuff.com>
> > >
> > > *Quis custodiet ipsos custodes?*
> > >
> > >
> > >
> > > On Mon, Aug 13, 2012 at 12:17 PM, spmyers7582 smyers@ wrote:
> > >
> > > > **
> > > >
> > > >
> > > > Also, I'm not sure if the parameters are correct or not. The
> > customisation
> > > > help dialog does not give any clue as to what the arguments
should be
> > in:
> > > >
> > > > Epicor.Mfg.UI.App.SelectSerialNumbersEntry.SerialNumbersArgs
> > > >
> > > > This is why I've started to experiment with an array list, to no
> > avail...
> > > >
> > > >
> > > > --- In vantage@yahoogroups.com, "spmyers7582" <smyers@> wrote:
> > > > >
> > > > > Epicor.Mfg.UI.SelectSerialNumbersEntry.dll
> > > > >
> > > > > Thanks
> > > > >
> > > > > --- In vantage@yahoogroups.com, Jose Gomez <jose@> wrote:
> > > > > >
> > > > > > Are you sure those are the correct parameters to lounch
Seria N0?
> > > > > > Which form ("DLL") are you launching.
> > > > > >
> > > > > > *Jose C Gomez*
> > > > > > *Software Engineer*
> > > > > > *
> > > > > > *
> > > > > > *
> > > > > > *T: 904.469.1524 mobile
> > > > > > E: jose@
> > > > > > http://www.josecgomez.com
> > > > > > <http://www.linkedin.com/in/josecgomez> <
> > > > http://www.facebook.com/josegomez>
> > > > > > <http://www.google.com/profiles/jose.gomez> <
> > > > http://www.twitter.com/joc85>
> > > > > > <http://www.josecgomez.com/professional-resume/>
> > > > > > <http://www.josecgomez.com/feed/>
> > > > > > <http://www.usdoingstuff.com>
> > > > > >
> > > > > > *Quis custodiet ipsos custodes?*
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Mon, Aug 13, 2012 at 11:47 AM, spmyers7582 <smyers@>
wrote:
> > > > > >
> > > > > > > **
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > I want to know how to launch this form in code, following
> > automatic
> > > > > > > population of a new line. At present, my code errors out
with the
> > > > > > > following message:
> > > > > > >
> > > > > > > 'Missing or invalid parameter value: PartNumber..'
> > > > > > >
> > > > > > > The code is as follows:
> > > > > > >
> > > > > > > Dim PartNumber As String =
dtl.dataView(dtl.Row)("PartNum")
> > > > > > > Dim Qty As Decimal =
dtl.dataView(dtl.Row)("OurJobShipQty")
> > > > > > > Dim PackNum As Integer = dtl.dataView(dtl.Row)("PackNum")
> > > > > > > Dim JobNo As String = Dtl.dataView(Dtl.Row)("JobNum")
> > > > > > >
> > > > > > > Dim SNParams As New System.Collections.ArrayList
> > > > > > >
> > > > > > > SNParams.Add(PartNumber)
> > > > > > > SNParams.Add(JobNo)
> > > > > > > SNParams.Add(Qty)
> > > > > > > SNParams.Add(PackNum)
> > > > > > >
> > > > > > > Dim lfo As New
> > > > > > >
Epicor.Mfg.UI.App.SelectSerialNumbersEntry.SerialNumbersArgs
> > > > > > >
> > > > > > > lfo.valuein = SNParams
> > > > > > >
> > > > > > > Dim SNlaunch AS UIReflector =
> > > > > > > ProcessCaller.LaunchCallBackForm(oTrans, "ShipSSN", lfo)
> > > > > > >
> > > > > > > Thanks for looking,
> > > > > > >
> > > > > > > Steve
> > > > > > >
> > > > > > > [Non-text portions of this message have been removed]
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > [Non-text portions of this message have been removed]
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>