For those of you who have a multi-plant setup this customization should
save your PO Entry people some time.
1. First you need to go into developer mode in Vantage
2. Go to Purchase Order Entry
3. Click Tools>Customization
4. Select Tools> Assembly Reference Manager and add the following
custom assemblies: Epicor.Mfg.AD.Plant Epicor.Mfg.BO.Plant
Epicor.Mfg.IF.IPlant
5. Once you have these added go into the script editor and add the
following:
DIM blnFix as DialogResult
Dim edvPO As EpiDataView =
CType(oTrans.EpiDataViews("POHeader"), EpiDataView)
Dim strPOPlant as String =
edvPO.dataView(edvPO.Row)("ShipName")
Dim strPlant As String =
POEntryForm.Session.PlantID
Dim adpPlant As PlantAdapter = New
PlantAdapter(POEntryForm)
adpPlant.BOConnect()
Dim blnResult As Boolean = adpPlant.GetByID(strPlant)
IF blnResult THEN
Dim strUIPlant as STRING =
adpPlant.PlantData.Tables("Plant").Rows(0)("Name")
IF strUIPlant <> strPOPlant THEN
blnFix = MessageBox.Show("Do you want to set
this PO to your plant?", "Plant", messageboxbuttons.yesno)
SELECT CASE blnFix
Case System.Windows.Forms.DialogResult.Yes
edvPO.dataView(edvPO.Row)("ShipName") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Name")
edvPO.dataView(edvPO.Row)("ShipAddress1") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Address1")
edvPO.dataView(edvPO.Row)("ShipAddress2") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Address2")
edvPO.dataView(edvPO.Row)("ShipAddress3") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Address3")
edvPO.dataView(edvPO.Row)("ShipCity") =
adpPlant.PlantData.Tables("Plant").Rows(0)("City")
edvPO.dataView(edvPO.Row)("ShipState") =
adpPlant.PlantData.Tables("Plant").Rows(0)("State")
edvPO.dataView(edvPO.Row)("ShipZip") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Zip")
edvPO.dataView(edvPO.Row)("ShipCountryNum") =
adpPlant.PlantData.Tables("Plant").Rows(0)("CountryNum")
CASE System.Windows.Forms.DialogResult.No
'DO NOTHING
END SELECT
END IF
END IF
adpPlant.Dispose()
6. Or if you don't know where to put that. Here is the XML you
could just import the xml into a new customization. Just ensure that you
have your Assembly references.
Here is the XML:
<?xml version="1.0" standalone="yes"?>
<CustomizationDS xmlns="http://tempuri.org/XMLSchema.xsd">
<xs:schema id="CustomizationDS"
targetNamespace="http://tempuri.org/XMLSchema.xsd"
xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
xmlns="http://tempuri.org/XMLSchema.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:msprop="urn:schemas-microsoft-com:xml-msprop"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="CustomizationDS" msdata:IsDataSet="true"
msdata:Locale="" msprop:Key3="" msprop:TypeCode="Customization"
msprop:Key2="App.POEntry.POEntryForm"
msprop:Description="PODefaultShipToAddress" msprop:ProductID="VN"
msprop:Key1="PODefaultShipTo" msprop:Company="MB">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Controls">
<xs:complexType>
<xs:sequence>
<xs:element name="FormsID" type="xs:string" />
<xs:element name="ControlName" type="xs:string" />
<xs:element name="Key" type="xs:string" />
<xs:element name="ParentControlKey" type="xs:string" />
<xs:element name="ControlType" type="xs:string" />
<xs:element name="Company" type="xs:string" />
<xs:element name="Plant" type="xs:string" />
<xs:element name="DcdUserId" type="xs:string" />
<xs:element name="GroupID" type="xs:string" />
<xs:element name="ControlsID" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Properties">
<xs:complexType>
<xs:sequence>
<xs:element name="FormsID" type="xs:string" />
<xs:element name="ControlName" type="xs:string" />
<xs:element name="Key" type="xs:string" />
<xs:element name="PropertyName" type="xs:string" />
<xs:element name="PropertyValue" type="xs:string" />
<xs:element name="Company" type="xs:string" />
<xs:element name="Plant" type="xs:string" />
<xs:element name="DcdUserID" type="xs:string" />
<xs:element name="GroupID" type="xs:string" />
<xs:element name="PropertiesID" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<Controls>
<FormsID>POEntryForm</FormsID>
<ControlName>epicor.mfg.ad.plant.dll</ControlName>
<Key>EpiString.ExecutionPath*epicor.mfg.ad.plant.dll</Key>
<ParentControlKey />
<ControlType>AssemblyReference</ControlType>
<Company />
<Plant />
<DcdUserId />
<GroupID />
<ControlsID />
</Controls>
<Controls>
<FormsID>POEntryForm</FormsID>
<ControlName>epicor.mfg.if.iplant.dll</ControlName>
<Key>EpiString.ExecutionPath*epicor.mfg.if.iplant.dll</Key>
<ParentControlKey />
<ControlType>AssemblyReference</ControlType>
<Company />
<Plant />
<DcdUserId />
<GroupID />
<ControlsID />
</Controls>
<Controls>
<FormsID>POEntryForm</FormsID>
<ControlName>epicor.mfg.bo.plant.dll</ControlName>
<Key>EpiString.ExecutionPath*epicor.mfg.bo.plant.dll</Key>
<ParentControlKey />
<ControlType>AssemblyReference</ControlType>
<Company />
<Plant />
<DcdUserId />
<GroupID />
<ControlsID />
</Controls>
<Properties>
<FormsID>POEntryForm</FormsID>
<ControlName>Customization</ControlName>
<Key>2dcd1674-5e34-4d98-b493-c75747027376</Key>
<PropertyName>Script</PropertyName>
<PropertyValue>'//**************************************************
'// Custom VB.NET code for POEntryForm
'// Created: 4/17/2009 10:09:29 AM
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO
Module Script
'// ** Wizard Insert Location - Do Not Remove 'Begin/End
Wizard Added Module Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **
Private WithEvents oTrans_poAdapter As EpiBaseAdapter
'// End Wizard Added Module Level Variables **
'// Add Custom Module Level Variables Here **
Sub InitializeCustomCode()
'// ** Wizard Insert Location - Do not
delete 'Begin/End Wizard Added Variable Intialization' lines **
'// Begin Wizard Added Variable
Intialization
oTrans_poAdapter =
csm.TransAdaptersHT("oTrans_poAdapter")
'// End Wizard Added Variable
Intialization
'// Begin Custom Method Calls
'// End Custom Method Calls
End Sub
Sub DestroyCustomCode()
'// ** Wizard Insert Location - Do not
delete 'Begin/End Wizard Added Object Disposal' lines **
'// Begin Wizard Added Object Disposal
oTrans_poAdapter = Nothing
'// End Wizard Added Object Disposal
'// Begin Custom Code Disposal
'// End Custom Code Disposal
End Sub
Private Sub oTrans_poAdapter_BeforeAdapterMethod(ByVal
sender As object, ByVal args As BeforeAdapterMethodArgs) Handles
oTrans_poAdapter.BeforeAdapterMethod
'// ** Argument Properties and Uses **
'// args.MethodName, args.Cancel
'
'Add Event Handler Code
'
'MessageBox.Show(args.MethodName) ' use
this to find method
Select Case args.MethodName
Case "Update"
DIM
blnFix as DialogResult
Dim edvPO As EpiDataView =
CType(oTrans.EpiDataViews("POHeader"), EpiDataView)
Dim strPOPlant as String =
edvPO.dataView(edvPO.Row)("ShipName")
Dim strPlant As String = POEntryForm.Session.PlantID
Dim adpPlant As PlantAdapter = New
PlantAdapter(POEntryForm)
adpPlant.BOConnect()
Dim blnResult As Boolean = adpPlant.GetByID(strPlant)
IF blnResult THEN
Dim strUIPlant as STRING =
adpPlant.PlantData.Tables("Plant").Rows(0)("Name")
IF strUIPlant <> strPOPlant THEN
blnFix = MessageBox.Show("Do you want to set
this PO to your plant?", "Plant", messageboxbuttons.yesno)
SELECT CASE blnFix
Case System.Windows.Forms.DialogResult.Yes
edvPO.dataView(edvPO.Row)("ShipName") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Name")
edvPO.dataView(edvPO.Row)("ShipAddress1") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Address1")
edvPO.dataView(edvPO.Row)("ShipAddress2") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Address2")
edvPO.dataView(edvPO.Row)("ShipAddress3") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Address3")
edvPO.dataView(edvPO.Row)("ShipCity") =
adpPlant.PlantData.Tables("Plant").Rows(0)("City")
edvPO.dataView(edvPO.Row)("ShipState") =
adpPlant.PlantData.Tables("Plant").Rows(0)("State")
edvPO.dataView(edvPO.Row)("ShipZip") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Zip")
edvPO.dataView(edvPO.Row)("ShipCountryNum") =
adpPlant.PlantData.Tables("Plant").Rows(0)("CountryNum")
CASE System.Windows.Forms.DialogResult.No
'DO NOTHING
END SELECT
END IF
END IF
adpPlant.Dispose()
Case Else
End Select
End Sub
End Module
</PropertyValue>
<Company />
<Plant />
<DcdUserID />
<GroupID />
<PropertiesID />
</Properties>
</CustomizationDS>
Thanks,
Travis
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Late, Travis
Sent: Friday, April 03, 2009 12:16 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: BPM for PO Suggestions Ship to
Exact same scenario I hit. I may hire a consultant to get this written
correctly for us. When we get it written I'll send it your way.
Thanks,
Travis
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Brian W. Spolarich
Sent: Friday, April 03, 2009 11:10 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Re: BPM for PO Suggestions Ship to
Basically the behavior I'd want is to have the Purchase Order Entry
program select the current plant as the default ship-to instead of the
one from the company config.
I'm playing with writing a BPM at the moment, but I'm not having any
luck so far. Looking at the trace of creating a new PO, the client does
this:
<tracePacket>
<businessObject>Epicor.Mfg.BO.PO</businessObject>
<methodName>GetNewPOHeader</methodName>
<returnType>void</returnType>
<localTime>4/3/2009 11:42:32:0468096 AM</localTime>
<executionTime>109.4205</executionTime>
<parameters>
<parameter name='ds' type='Epicor.Mfg.BO.PODataSet' ><PODataSet
xmlns="http://www.epicor.com/Mfg/100/BO.PO/PO" /></parameter>
</parameters>
<paramDataSetChanges>
</paramDataSetChanges>
</tracePacket>
What I don't understand is that GetNewPOHeader returns void versus
returning a PODataSet with some default values filled in (which is
conceptually what I would have expected it to do). I tried adding a BPM
action to:
set the POHeader.ShipAddress1 field of the updated row to the "TEST
123456" value
(or "all rows")
But nothing happens.
-bws
--
Brian W. Spolarich ~ Manager, Information Services ~ Advanced Photonix /
Picometrix
bspolarich@...
<mailto:bspolarich%40advancedphotonix.com>
<mailto:bspolarich%40advancedphotonix.com> ~ 734-864-5618 ~
www.advancedphotonix.com
-----Original Message-----
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 Late, Travis
Sent: Friday, April 03, 2009 11:30 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Re: BPM for PO Suggestions Ship to
Not yet, but I'm working on creating a BPM to get this working. Once I
get one written I'll send it your way.
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 Brian W. Spolarich
Sent: Friday, April 03, 2009 10:25 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: BPM for PO Suggestions Ship to
Travis, did you ever get a resolution to your question? I have the same
issue.
--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ,
"Late, Travis" <tlate@...> wrote:
------------------------------------
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder
and Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
<http://groups.yahoo.com/group/vantage/files/>
<http://groups.yahoo.com/group/vantage/files/>
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
save your PO Entry people some time.
1. First you need to go into developer mode in Vantage
2. Go to Purchase Order Entry
3. Click Tools>Customization
4. Select Tools> Assembly Reference Manager and add the following
custom assemblies: Epicor.Mfg.AD.Plant Epicor.Mfg.BO.Plant
Epicor.Mfg.IF.IPlant
5. Once you have these added go into the script editor and add the
following:
DIM blnFix as DialogResult
Dim edvPO As EpiDataView =
CType(oTrans.EpiDataViews("POHeader"), EpiDataView)
Dim strPOPlant as String =
edvPO.dataView(edvPO.Row)("ShipName")
Dim strPlant As String =
POEntryForm.Session.PlantID
Dim adpPlant As PlantAdapter = New
PlantAdapter(POEntryForm)
adpPlant.BOConnect()
Dim blnResult As Boolean = adpPlant.GetByID(strPlant)
IF blnResult THEN
Dim strUIPlant as STRING =
adpPlant.PlantData.Tables("Plant").Rows(0)("Name")
IF strUIPlant <> strPOPlant THEN
blnFix = MessageBox.Show("Do you want to set
this PO to your plant?", "Plant", messageboxbuttons.yesno)
SELECT CASE blnFix
Case System.Windows.Forms.DialogResult.Yes
edvPO.dataView(edvPO.Row)("ShipName") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Name")
edvPO.dataView(edvPO.Row)("ShipAddress1") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Address1")
edvPO.dataView(edvPO.Row)("ShipAddress2") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Address2")
edvPO.dataView(edvPO.Row)("ShipAddress3") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Address3")
edvPO.dataView(edvPO.Row)("ShipCity") =
adpPlant.PlantData.Tables("Plant").Rows(0)("City")
edvPO.dataView(edvPO.Row)("ShipState") =
adpPlant.PlantData.Tables("Plant").Rows(0)("State")
edvPO.dataView(edvPO.Row)("ShipZip") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Zip")
edvPO.dataView(edvPO.Row)("ShipCountryNum") =
adpPlant.PlantData.Tables("Plant").Rows(0)("CountryNum")
CASE System.Windows.Forms.DialogResult.No
'DO NOTHING
END SELECT
END IF
END IF
adpPlant.Dispose()
6. Or if you don't know where to put that. Here is the XML you
could just import the xml into a new customization. Just ensure that you
have your Assembly references.
Here is the XML:
<?xml version="1.0" standalone="yes"?>
<CustomizationDS xmlns="http://tempuri.org/XMLSchema.xsd">
<xs:schema id="CustomizationDS"
targetNamespace="http://tempuri.org/XMLSchema.xsd"
xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
xmlns="http://tempuri.org/XMLSchema.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:msprop="urn:schemas-microsoft-com:xml-msprop"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="CustomizationDS" msdata:IsDataSet="true"
msdata:Locale="" msprop:Key3="" msprop:TypeCode="Customization"
msprop:Key2="App.POEntry.POEntryForm"
msprop:Description="PODefaultShipToAddress" msprop:ProductID="VN"
msprop:Key1="PODefaultShipTo" msprop:Company="MB">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Controls">
<xs:complexType>
<xs:sequence>
<xs:element name="FormsID" type="xs:string" />
<xs:element name="ControlName" type="xs:string" />
<xs:element name="Key" type="xs:string" />
<xs:element name="ParentControlKey" type="xs:string" />
<xs:element name="ControlType" type="xs:string" />
<xs:element name="Company" type="xs:string" />
<xs:element name="Plant" type="xs:string" />
<xs:element name="DcdUserId" type="xs:string" />
<xs:element name="GroupID" type="xs:string" />
<xs:element name="ControlsID" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Properties">
<xs:complexType>
<xs:sequence>
<xs:element name="FormsID" type="xs:string" />
<xs:element name="ControlName" type="xs:string" />
<xs:element name="Key" type="xs:string" />
<xs:element name="PropertyName" type="xs:string" />
<xs:element name="PropertyValue" type="xs:string" />
<xs:element name="Company" type="xs:string" />
<xs:element name="Plant" type="xs:string" />
<xs:element name="DcdUserID" type="xs:string" />
<xs:element name="GroupID" type="xs:string" />
<xs:element name="PropertiesID" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<Controls>
<FormsID>POEntryForm</FormsID>
<ControlName>epicor.mfg.ad.plant.dll</ControlName>
<Key>EpiString.ExecutionPath*epicor.mfg.ad.plant.dll</Key>
<ParentControlKey />
<ControlType>AssemblyReference</ControlType>
<Company />
<Plant />
<DcdUserId />
<GroupID />
<ControlsID />
</Controls>
<Controls>
<FormsID>POEntryForm</FormsID>
<ControlName>epicor.mfg.if.iplant.dll</ControlName>
<Key>EpiString.ExecutionPath*epicor.mfg.if.iplant.dll</Key>
<ParentControlKey />
<ControlType>AssemblyReference</ControlType>
<Company />
<Plant />
<DcdUserId />
<GroupID />
<ControlsID />
</Controls>
<Controls>
<FormsID>POEntryForm</FormsID>
<ControlName>epicor.mfg.bo.plant.dll</ControlName>
<Key>EpiString.ExecutionPath*epicor.mfg.bo.plant.dll</Key>
<ParentControlKey />
<ControlType>AssemblyReference</ControlType>
<Company />
<Plant />
<DcdUserId />
<GroupID />
<ControlsID />
</Controls>
<Properties>
<FormsID>POEntryForm</FormsID>
<ControlName>Customization</ControlName>
<Key>2dcd1674-5e34-4d98-b493-c75747027376</Key>
<PropertyName>Script</PropertyName>
<PropertyValue>'//**************************************************
'// Custom VB.NET code for POEntryForm
'// Created: 4/17/2009 10:09:29 AM
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO
Module Script
'// ** Wizard Insert Location - Do Not Remove 'Begin/End
Wizard Added Module Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **
Private WithEvents oTrans_poAdapter As EpiBaseAdapter
'// End Wizard Added Module Level Variables **
'// Add Custom Module Level Variables Here **
Sub InitializeCustomCode()
'// ** Wizard Insert Location - Do not
delete 'Begin/End Wizard Added Variable Intialization' lines **
'// Begin Wizard Added Variable
Intialization
oTrans_poAdapter =
csm.TransAdaptersHT("oTrans_poAdapter")
'// End Wizard Added Variable
Intialization
'// Begin Custom Method Calls
'// End Custom Method Calls
End Sub
Sub DestroyCustomCode()
'// ** Wizard Insert Location - Do not
delete 'Begin/End Wizard Added Object Disposal' lines **
'// Begin Wizard Added Object Disposal
oTrans_poAdapter = Nothing
'// End Wizard Added Object Disposal
'// Begin Custom Code Disposal
'// End Custom Code Disposal
End Sub
Private Sub oTrans_poAdapter_BeforeAdapterMethod(ByVal
sender As object, ByVal args As BeforeAdapterMethodArgs) Handles
oTrans_poAdapter.BeforeAdapterMethod
'// ** Argument Properties and Uses **
'// args.MethodName, args.Cancel
'
'Add Event Handler Code
'
'MessageBox.Show(args.MethodName) ' use
this to find method
Select Case args.MethodName
Case "Update"
DIM
blnFix as DialogResult
Dim edvPO As EpiDataView =
CType(oTrans.EpiDataViews("POHeader"), EpiDataView)
Dim strPOPlant as String =
edvPO.dataView(edvPO.Row)("ShipName")
Dim strPlant As String = POEntryForm.Session.PlantID
Dim adpPlant As PlantAdapter = New
PlantAdapter(POEntryForm)
adpPlant.BOConnect()
Dim blnResult As Boolean = adpPlant.GetByID(strPlant)
IF blnResult THEN
Dim strUIPlant as STRING =
adpPlant.PlantData.Tables("Plant").Rows(0)("Name")
IF strUIPlant <> strPOPlant THEN
blnFix = MessageBox.Show("Do you want to set
this PO to your plant?", "Plant", messageboxbuttons.yesno)
SELECT CASE blnFix
Case System.Windows.Forms.DialogResult.Yes
edvPO.dataView(edvPO.Row)("ShipName") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Name")
edvPO.dataView(edvPO.Row)("ShipAddress1") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Address1")
edvPO.dataView(edvPO.Row)("ShipAddress2") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Address2")
edvPO.dataView(edvPO.Row)("ShipAddress3") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Address3")
edvPO.dataView(edvPO.Row)("ShipCity") =
adpPlant.PlantData.Tables("Plant").Rows(0)("City")
edvPO.dataView(edvPO.Row)("ShipState") =
adpPlant.PlantData.Tables("Plant").Rows(0)("State")
edvPO.dataView(edvPO.Row)("ShipZip") =
adpPlant.PlantData.Tables("Plant").Rows(0)("Zip")
edvPO.dataView(edvPO.Row)("ShipCountryNum") =
adpPlant.PlantData.Tables("Plant").Rows(0)("CountryNum")
CASE System.Windows.Forms.DialogResult.No
'DO NOTHING
END SELECT
END IF
END IF
adpPlant.Dispose()
Case Else
End Select
End Sub
End Module
</PropertyValue>
<Company />
<Plant />
<DcdUserID />
<GroupID />
<PropertiesID />
</Properties>
</CustomizationDS>
Thanks,
Travis
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Late, Travis
Sent: Friday, April 03, 2009 12:16 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: BPM for PO Suggestions Ship to
Exact same scenario I hit. I may hire a consultant to get this written
correctly for us. When we get it written I'll send it your way.
Thanks,
Travis
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Brian W. Spolarich
Sent: Friday, April 03, 2009 11:10 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Re: BPM for PO Suggestions Ship to
Basically the behavior I'd want is to have the Purchase Order Entry
program select the current plant as the default ship-to instead of the
one from the company config.
I'm playing with writing a BPM at the moment, but I'm not having any
luck so far. Looking at the trace of creating a new PO, the client does
this:
<tracePacket>
<businessObject>Epicor.Mfg.BO.PO</businessObject>
<methodName>GetNewPOHeader</methodName>
<returnType>void</returnType>
<localTime>4/3/2009 11:42:32:0468096 AM</localTime>
<executionTime>109.4205</executionTime>
<parameters>
<parameter name='ds' type='Epicor.Mfg.BO.PODataSet' ><PODataSet
xmlns="http://www.epicor.com/Mfg/100/BO.PO/PO" /></parameter>
</parameters>
<paramDataSetChanges>
</paramDataSetChanges>
</tracePacket>
What I don't understand is that GetNewPOHeader returns void versus
returning a PODataSet with some default values filled in (which is
conceptually what I would have expected it to do). I tried adding a BPM
action to:
set the POHeader.ShipAddress1 field of the updated row to the "TEST
123456" value
(or "all rows")
But nothing happens.
-bws
--
Brian W. Spolarich ~ Manager, Information Services ~ Advanced Photonix /
Picometrix
bspolarich@...
<mailto:bspolarich%40advancedphotonix.com>
<mailto:bspolarich%40advancedphotonix.com> ~ 734-864-5618 ~
www.advancedphotonix.com
-----Original Message-----
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 Late, Travis
Sent: Friday, April 03, 2009 11:30 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Re: BPM for PO Suggestions Ship to
Not yet, but I'm working on creating a BPM to get this working. Once I
get one written I'll send it your way.
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 Brian W. Spolarich
Sent: Friday, April 03, 2009 10:25 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: BPM for PO Suggestions Ship to
Travis, did you ever get a resolution to your question? I have the same
issue.
--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ,
"Late, Travis" <tlate@...> wrote:
>and
> Has anyone created a BPM to fix the problem with New PO Suggestions
> the PO ship to address? I'm sure if you are a multi-plant facility youin
> have noticed that the ship to automatically grabs the default address
> the company configuration. If someone has found a fix for this would[Non-text portions of this message have been removed]
> they be willing to share?
>
>
>
> Thanks,
>
>
>
> Travis Late
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
------------------------------------
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder
and Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
<http://groups.yahoo.com/group/vantage/files/>
<http://groups.yahoo.com/group/vantage/files/>
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]