I was working on something similar. What you need is the UD03Adapter, not the InvTransferAdapter. This is how it should look:
Dim varUD03Adapter As UD03Adapter = New UD03Adapter(RecptToInvEntry)
Instead of "BAQReportForm", use "RecptToInvEntry". That is the name of the form you are calling the adapter from. In this case if you want to use the Job Receipt To Inventory form. (I'm fairly new, but I'm pretty sure I have the right name there.)
Where he has UD101, you want UD03. He only used UD10 once, as a declared name, so it didn't really have anything to do with the table. As you can see by his code, you can substitute any field name in the UD03 table and assign a value to it. The only restriction is the Key 1 field, or combination of key fields need to be unique, if I understand that correctly. I haven't done this exact thing, so no guarantees.
I hope that helps.
Dim varUD03Adapter As UD03Adapter = New UD03Adapter(RecptToInvEntry)
Instead of "BAQReportForm", use "RecptToInvEntry". That is the name of the form you are calling the adapter from. In this case if you want to use the Job Receipt To Inventory form. (I'm fairly new, but I'm pretty sure I have the right name there.)
Where he has UD101, you want UD03. He only used UD10 once, as a declared name, so it didn't really have anything to do with the table. As you can see by his code, you can substitute any field name in the UD03 table and assign a value to it. The only restriction is the Key 1 field, or combination of key fields need to be unique, if I understand that correctly. I haven't done this exact thing, so no guarantees.
I hope that helps.
--- In vantage@yahoogroups.com, "Karen Schoenung" <kschoenung@...> wrote:
>
> Sean,
>
>
>
> I am getting back to this now, but don't quite understand the code...
>
>
>
> I am using UD03 as the child table and want to use the information on
> the Job Receipt to Inventory form to populate Key1, Key 2 and Key5,
> while entering values for Key3 and Key4.
>
>
>
> I think I would use UD03 where you have UD10...
>
>
>
> I think this would be my Dim statement:
>
> Dim varUD03Adapter As InvTransferAdapter = New
> InvTransferAdapter(BAQReportForm)
>
>
>
> I do not understand what should be listed in place of UD101 in reference
> to the Job Receipt to Inventory form...Or does this code only work with
> UD tables as parent/child?
>
> Please help if you get a moment.
>
> Thanks,
>
> Karen
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Sean McDaniel
> Sent: Tuesday, March 16, 2010 7:03 PM
> To: vantage@yahoogroups.com
> Subject: RE: [Vantage] Customization - how to autopopulate fields in a
> UD table
>
>
>
>
>
> BPM's can't insert records into another table. However, this can be done
> via
> customization.
>
> You can use the adapters to do this.
>
> Here is a tiny snippet showing some of the code to do this. You can set
> up
> the UD101 UI in a menu and then do a trace to get the exact method calls
> that are made.
>
> --Sean
>
> Dim varUD10Adapter As UD101Adapter = New UD101Adapter(BAQReportForm)
>
> varUD10Adapter.BOConnect()
>
> if varUD10Adapter.GetaNewUD101()=true then
>
> varUD10Adapter.UD101Data.Tables("UD101").Rows(0)("Key1") = Key1.text
>
> varUD10Adapter.UD101Data.Tables("UD101").Rows(0)("Key2") = Key2.text
>
> varUD10Adapter.UD101Data.Tables("UD101").Rows(0)("Key3") = Key3.text
>
> varUD10Adapter.UD101Data.Tables("UD101").Rows(0)("Key4") =
> RandomClass.Next().tostring()
>
> varUD10Adapter.UD101Data.Tables("UD101").Rows(0)("Key5") = String.Empty
>
> Key4.text = varUD10Adapter.UD101Data.Tables("UD101").Rows(0)("Key4")
>
> 'varUD10Adapter.UD101Data.Tables("UD101").Rows(0)("Character01") =
> """"""
>
> varUD10Adapter.Update()
>
> end if
>
> From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
> Behalf Of
> advantage@... <mailto:advantage%40wcoil.com>
> Sent: Tuesday, March 16, 2010 5:20 PM
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Subject: Re: [Vantage] Customization - how to autopopulate fields in a
> UD
> table
>
> Based on what data a BPM will do
> Sent from my Verizon Wireless BlackBerry
>
> -----Original Message-----
> From: "karen_schoenung" <kschoenung@...
> <mailto:kschoenung%40fisher-barton.com>
> <mailto:kschoenung%40fisher-barton.com> >
> Date: Tue, 16 Mar 2010 21:04:16
> To: <vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> <mailto:vantage%40yahoogroups.com> >
> Subject: [Vantage] Customization - how to autopopulate fields in a UD
> table
>
> How can I autopopulate fields in a UD table based on current record from
> another form?
>
> Thx in advance.
>
> [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]
>