Hello,
So I am having the same problem where I get an error that says "A Transfer Record was not found". My code looks like this...
InvTransferAdapter ita = new InvTransferAdapter(this.oTrans);
ita.BOConnect();
InvTransferDataSet itds = ita.GetTransferRecord("Test Part 1-1", "EA");
itds.Tables["InvTrans"].Rows[0]["RowMod"] = "A";
itds.Tables["InvTrans"].Rows[0]["ToWarehouseCode"] = "100002";
ita.ChangeToWhse(itds);
itds.Tables["InvTrans"].Rows[0]["ToBinNum"] = 1;
ita.ChangeToBin(itds);
itds.Tables["InvTrans"].Rows[0]["FromLotNumber"] = "1";
itds.Tables["InvTrans"].Rows[0]["ToLotNumber"] = "1";
ita.ChangeLot(itds);
itds.Tables["InvTrans"].Rows[0]["TransferQty"] = 3;
string out1, out2;
ita.CommitTransfer(itds, out out1, out out2);
ita.Dispose();
When I try running it with the Business Logic Test Tool, it works perfectly fine, but when attempting to run this code, it doesn't.
Thank you for the help!
So I am having the same problem where I get an error that says "A Transfer Record was not found". My code looks like this...
InvTransferAdapter ita = new InvTransferAdapter(this.oTrans);
ita.BOConnect();
InvTransferDataSet itds = ita.GetTransferRecord("Test Part 1-1", "EA");
itds.Tables["InvTrans"].Rows[0]["RowMod"] = "A";
itds.Tables["InvTrans"].Rows[0]["ToWarehouseCode"] = "100002";
ita.ChangeToWhse(itds);
itds.Tables["InvTrans"].Rows[0]["ToBinNum"] = 1;
ita.ChangeToBin(itds);
itds.Tables["InvTrans"].Rows[0]["FromLotNumber"] = "1";
itds.Tables["InvTrans"].Rows[0]["ToLotNumber"] = "1";
ita.ChangeLot(itds);
itds.Tables["InvTrans"].Rows[0]["TransferQty"] = 3;
string out1, out2;
ita.CommitTransfer(itds, out out1, out out2);
ita.Dispose();
When I try running it with the Business Logic Test Tool, it works perfectly fine, but when attempting to run this code, it doesn't.
Thank you for the help!
--- In vantage@yahoogroups.com, "Kevin Simon" <ksimon@...> wrote:
>
> Joe,
>
>
>
> Worked great - thanks for the tip. I didn't realize there would be a
> difference in using the adapter versus the BO.
>
>
>
> Kevin
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> Joe Rojas
> Sent: Wednesday, March 02, 2011 9:08 AM
> To: vantage@yahoogroups.com
> Subject: RE: [Vantage] Calling Inventory Transfer from within Customization
>
>
>
>
>
> Oh yeah. Don't forget:
>
> dsInvXF.Tables("InvTrans").Rows(0)("RowMod") = "A"
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
> Behalf
> Of Joe Rojas
> Sent: Wednesday, March 02, 2011 8:51 AM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Subject: RE: [Vantage] Calling Inventory Transfer from within
> Customization
>
> This is why I'm not a fan of adapters. :)
>
> The issue is that even though you are passing in a dataset, it's not
> actually using that dataset.
>
> Adapters act as wrappers for BOs and they also add some GUI capability
> to interact with the user.
>
> In this case, the InvTransferAdapter has its own internal tables that
> you need to set as opposed to setting them externally in dsInvXF.
>
> My opinion would be to which to the BO in this case.
>
> You code would look something like this:
>
> Dim boInvXf As InvTransfer = New InvTransfer(Not sure it oTran will
> work. I think you need a session.connectionpool)
>
> 'Get the transfer record
>
> Dim dsInvXf As InvTransferDataSet = boInvXf.GetTransferRecord(wkPN, "")
>
> MessageBox.Show("Got Transfer Rec " &
>
> dsInvXF.Tables("InvTrans").Rows(0)("FromBinNum") )
>
> dsInvXF.Tables("InvTrans").Rows(0)("FromBinNum") = wkFromBin
>
> dsInvXF.Tables("InvTrans").Rows(0)("ToBinNum") = wkToBin
>
> dsInvXF.Tables("InvTrans").Rows(0)("TransferQty") = wkTransQty
>
> boInvXf.CommitTransfer(dsInvXF, "", "") Second parameter is an "out"
> parameter. You need to pass it a variable so that it can store any
> messages.
>
> adInvXf.Dispose()
>
> adInvXf = Nothing
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com> ] On
> Behalf
> Of Kevin Simon
> Sent: Tuesday, March 01, 2011 11:42 PM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> Subject: RE: [Vantage] Calling Inventory Transfer from within
> Customization
>
> Joe,
>
> Thanks for the help. Unfortunately, that's not the issue. I had already
> tried setting rowmod = "U" to no avail. So, I tried RowMod = "A", there
> was
> no difference.
>
> When I run a trace on it, there's simply nothing getting passed to the
> CommitTransfer. It's not that I see data in the dataset, there's nothing
> there. I've definitely got one row in the dataset, as I've verified
> through
> displaying data from it on the screen. However, when it executes the
> statement:
>
> Dim result As Boolean = adInvXf.CommitTransfer(dsInvXF, "", "")
>
> It's as if dsInvXF is empty.
>
> I took off the "dim result as Boolean =" from the statement, figuring if
> it
> failed it'd give me exception processing, but it simply displays nothing
> is
> there.
>
> If anyone has any ideas, or sample code that's doing a similar thing
> (initiating a transaction, then executing some type of commit), I'd
> truly
> appreciate it. I've done this tons of times with GetNew and Update type
> transactions.
>
> Thanks.
>
> Kevin Simon
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com> ] On
> Behalf Of
> Joe Rojas
> Sent: Tuesday, March 01, 2011 12:03 PM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> Subject: RE: [Vantage] Calling Inventory Transfer from within
> Customization
>
> Hi Kevin,
>
> I never know when, or if, you have to use BeginEdit and EndEdit so it
> may or may not matter.
>
> With that said, the issue is that you are not setting RowMod = "A".
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com> ] On
> Behalf
> Of Kevin Simon
> Sent: Tuesday, March 01, 2011 11:05 AM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> Subject: RE: [Vantage] Calling Inventory Transfer from within
> Customization
>
> Giving this a gentle nudge, anyone have any input?
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com> ] On
> Behalf Of
> ksimon8fw
> Sent: Saturday, February 26, 2011 5:06 PM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Calling Inventory Transfer from within Customization
>
> I've got a customization and I'm trying to create an inventory transfer
> from
> within it. I'm having a problem, it's getting the inventory transfer
> record,
> but when I do the CommitTransfer, it's telling me "A transfer record was
> not
> found".
>
> Here's the snippet of code I'm using:
>
> =================================================================
> Dim adInvXf As InvTransferAdapter = New InvTransferAdapter(oTrans)
> adInvXf.BOConnect()
> 'Get the transfer record
> Dim dsInvXf As InvTransferDataSet = adInvXf.GetTransferRecord(wkPN, "")
>
> MessageBox.Show("Got Transfer Rec " &
> dsInvXF.Tables("InvTrans").Rows(0)("FromBinNum") )
>
> dsInvXF.Tables("InvTrans").Rows(0)("FromBinNum") = wkFromBin
> dsInvXF.Tables("InvTrans").Rows(0)("ToBinNum") = wkToBin
> dsInvXF.Tables("InvTrans").Rows(0)("TransferQty") = wkTransQty
>
> Dim result As Boolean = adInvXf.CommitTransfer(dsInvXF, "", "")
>
> adInvXf.Dispose()
> adInvXf = Nothing
> =================================================================
>
> The MessageBox that I display is showing the GetTransferRecord is
> working
> properly, it's pulling up the defaults that I expect to see. When I run
> a
> trace on my code, it's showing that it's not passing anything back to
> the
> CommitTransfer, as if dsInvXF is blank. Is there something wrong with my
> syntax?
>
> Thanks.
> Kevin Simon
>
> [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]
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> [Non-text portions of this message have been removed]
>