Default Warehouse - Vantage 8.03.408

Jeff,

What I do when I have to create part records for a bunch of new parts is change the company default warehouse to the one I need at the moment. [I have to use a bunch of different logical warehouses, sometimes in the same physical space. Why that is gets complicated and connects to us being a gov't contractor; not important for this discussion.] For parts that already exist in my Part master file, I have to add the new warehouse, but that would be true whatever setting I used for the default warehouse.

I agree that it's a pain to have to change the primary and then delete the default. You could settle for just changing the primary warehouse and make very plain that the default is a dummy. It's not quite as clean or elegant, but it should work.

Thinking on it a bit more, if you wrote the customization I suggested in my first note, you could probably automate the deletion of the default warehouse record in the same routine. The PrimWhse value is stored in the PartPlant dataview - here's the provided code:

Dim [edvVarName] As EpiDataView = CType(oTrans.EpiDataViews("PartPlant"), EpiDataView)
Dim [VarName] As String = [edvVarName].dataView([edvVarName].Row)("PrimWhse")


Then the next step would be:

[edvVarName].dataview([edvVarName].Row)("PrimWhse") =strWarehouseDuJour

Come to think, it would probably be a bit faster to declare the variables Private up at the top, and then capture the warehouse you need, maybe with a pop-up box, in the string variable strWarehouseDuJour.

I had to do something conceptually similar and just got it sorted out this week. Here's the relevant code that I finally got to with the help of our vendor:

'Get Charge Number data from Requisition Detail Table
'First get Req Line info from PORel view
Dim intReqNum As Int32 = edvPORel.dataView(edvPORel.Row)("ReqNum")
Dim intReqLine As Int32 = edvPORel.dataView(edvPORel.Row)("ReqLine")
Dim blnYes As Boolean
Dim strWhereClause As String

'Gets the entire requisition record
Dim blnRequisition As Boolean = ReqAdapter.GetByID(intReqNum)

'Item (1) is the ReqDetail table
For Each drReqLine As DataRow in ReqAdapter.ReqData.Tables.Item(1).Rows

If drReqLine.Item("ReqLine") = intReqLine Then

edvPORel.dataView(edvPORel.Row)("ShortChar01") = drReqLine.Item("ShortChar01")
edvPORel.dataView(edvPORel.Row)("ShortChar02") = drReqLine.Item("ShortChar02")
edvPORel.dataView(edvPORel.Row)("ShortChar03") = drReqLine.Item("ShortChar03")

Exit For
End If
Next drReqLine

It's far from elegant, but the method provided to get a particular record using the Company, Requisition Number, and Requisition Line, doesn't work. You could do essentially the same thing, changing the particulars to meet your situation. The tricky part will be getting the right Item number to access the PartWhse table, but you could probably persuade it to spit out the entire collection if you asked nicely. Or beat it with a club, which is too often what I wish I could do. Oh, and I declared edvPORel as a Data View, and ReqAdapter as a Requisition Adapter, up in the global variables.

[ In the Adapters section I found a method for your situation that corresponds to the FindByCompanyReqNumReqLine that I tried first:

Dim [varAdapterName] As PartAdapterPartData = New PartAdapterPartData([UIForm])
[varAdapterName].BOConnect()

Dim [varName] As Epicor.Mfg.BO.PartDataSet+PartWhseRow = [varAdapterName].PartData.PartWhse.FindByCompanyPartNumPlantWarehouseCode(Company, PartNum, Plant, WarehouseCode)

I wouldn't bet that this works, and it only finds the record for you and returns the dataset, when what you want is to delete it. Oh, and the PartDataSet+PartWhseRow won't compile. Change the plus sign to a period if you try this.]

Good luck!


Lynn Thomas
Senior Engineer
SAIC
317-357-4041 X255



[Non-text portions of this message have been removed]
We use multiple warehouses to aid with our cycle counting process.

Vantage requires a Default Warehouse (Whse A) in the Company Configuration and this default is automatically put on each Part Plant record as the Primary Warehouse during Part entry.

We then go into the Part Plant record, add the correct Primary Warehouse (Whse B) and delete the Default Warehouse.

This is fine, as long as the engineers ALWAYS remember to add the Primary Warehouse and delete the default warehouse. They don't always remember. Once there has been a transaction (which usually occurs shortly after the part has been entered) the default warehouse can no longer be deleted. You can add the correct Primary Warehouse, but you're forever stuck with the default warehouse on that part.

Is there a way to write a script of any kind that will not allow saving of the record if "Whse A" is selected as the Primary Warehouse? In 6.1 we would have had a Report Builder report that ran and e-mailed the engineers regularly throughout the day using Mike Podlin's Auto Reports program but now we're not sure how to handle this type of "Watchdog" notification.

Any suggestions are very welcome.

Sincerely,
Judy Havlik
Plitek, L.L.C.
judy.havlik@...
A BPM could probably be written to create Whse B when the plant is
created and then change the plant primary warehouse from Whse A to Whse
B.

Why not change the company config changing to whse B?





Charlie Smith

Smith Business Services / 2W Technologies LLC

www.vistaconsultant.com <http://www.vistaconsultant.com/> /
www.2WTech.com









From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of judyh001
Sent: Wednesday, August 26, 2009 1:53 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Default Warehouse - Vantage 8.03.408





We use multiple warehouses to aid with our cycle counting process.

Vantage requires a Default Warehouse (Whse A) in the Company
Configuration and this default is automatically put on each Part Plant
record as the Primary Warehouse during Part entry.

We then go into the Part Plant record, add the correct Primary Warehouse
(Whse B) and delete the Default Warehouse.

This is fine, as long as the engineers ALWAYS remember to add the
Primary Warehouse and delete the default warehouse. They don't always
remember. Once there has been a transaction (which usually occurs
shortly after the part has been entered) the default warehouse can no
longer be deleted. You can add the correct Primary Warehouse, but you're
forever stuck with the default warehouse on that part.

Is there a way to write a script of any kind that will not allow saving
of the record if "Whse A" is selected as the Primary Warehouse? In 6.1
we would have had a Report Builder report that ran and e-mailed the
engineers regularly throughout the day using Mike Podlin's Auto Reports
program but now we're not sure how to handle this type of "Watchdog"
notification.

Any suggestions are very welcome.

Sincerely,
Judy Havlik
Plitek, L.L.C.
judy.havlik@... <mailto:judy.havlik%40plitek.com>





[Non-text portions of this message have been removed]
Judy,

You could use a BPM to handle the notifications. Or, you could write a customization to prevent saving the record until the value in the field is valid. Page 122 of the Tools User Guide suggests the DataTable.ColumnChanging event for this sort of thing. Somewhere I've seen an example of validating a field, but I can't recall exactly where. It's not that uncommon a thing to do, though, so I think it shouldn't be too hard to find. Of course, I say that as I find myself unable to locate it...

Lynn Thomas
Senior Engineer
SAIC
317-357-4041 X255



[Non-text portions of this message have been removed]
Thanks, Lynn...I forwarded your response to our expert to see if it helps.

Charlie...we really don't have an appropriate default warehouse and we prefer that every part has only one warehouse record.

Sincerely,
Judy Havlik
Plitek, L.L.C.
Hi Lynn,

I work with Judy at PLITEK. The problem I have (and don't know how to solve) is that the value for primary warehouse isn't assigned until after the new part record is saved for the first time so I really don't have anything to validate against or any way to effectively stop the part from being entered into the system without the default primary warehouse being assigned.

Our issue is that the primary warehouse may not always be the correct one depending on the part. It is a pain for the engineers to have to remember to add a new warehouse and delete the default primary everytime.

BPM Notifications, dashboards, reports are ways to monitor it, but that's not really what we are after. Ideally we'd like to be more proactive rather than reactive.

I'm sure I'm missing something, but can't figure it out. Any suggestions would be greatly appreciated.

Jeff Kusiciel
PLITEK
847-803-5403

--- In vantage@yahoogroups.com, "Thomas, Lynn A." <thomasl@...> wrote:
>
> Judy,
>
> You could use a BPM to handle the notifications. Or, you could write a customization to prevent saving the record until the value in the field is valid. Page 122 of the Tools User Guide suggests the DataTable.ColumnChanging event for this sort of thing. Somewhere I've seen an example of validating a field, but I can't recall exactly where. It's not that uncommon a thing to do, though, so I think it shouldn't be too hard to find. Of course, I say that as I find myself unable to locate it...
>
> Lynn Thomas
> Senior Engineer
> SAIC
> 317-357-4041 X255
>
>
>
> [Non-text portions of this message have been removed]
>