BPM needed Blank Title 81383

Here is some code to try:
As sales order entry does (did?) not update data before printing, this code hides the form's print 'buttons' and inserts buttons you can capture the click event on, so you can make sure data has been updated.

I added a dataview notification event and set the enabled properties of the print buttons to be equal to the OrderHed.ReadyToCalc value

this may accomplish what you want.....

bw

'//**************************************************
'// Custom VB.NET code for SalesOrderForm
'// Created: 4/17/2009 1:32:16 PM
'//**************************************************
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
Imports System.Reflection
Imports System.Collections

Module Script


'// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **

Private WithEvents edvOrderHed As EpiDataView
'// End Wizard Added Module Level Variables **


'// Add Custom Module Level Variables Here **
dim tools as Infragistics.Win.UltraWinToolbars.UltraToolbarsManager
dim printButton as Infragistics.Win.UltraWinToolbars.ButtonTool


Sub InitializeCustomCode()


'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
'// Begin Wizard Added Variable Intialization

edvOrderHed = CType(oTrans.EpiDataViews("OrderHed"), EpiDataView)
'// End Wizard Added Variable Intialization
'// Begin Custom Method Calls
dim obj as Object = GetType(Epicor.Mfg.UI.App.SalesOrderEntry.SalesOrderForm).InvokeMember("baseToolbarsManager", BindingFlags.Instance Or BindingFlags.GetField Or BindingFlags.NonPublic, Nothing, SalesOrderForm, Nothing)
tools = ctype(obj,Infragistics.Win.UltraWinToolbars.UltraToolbarsManager)
printButton = addMyPrintButton()
addhandler printButton.ToolClick, addressof printClick
'// End Custom Method Calls
End Sub

Function addMyPrintButton() As Infragistics.Win.UltraWinToolbars.ButtonTool
dim printButton as new Infragistics.Win.UltraWinToolbars.ButtonTool("MyPrintTool")
dim pop as Infragistics.Win.UltraWinToolbars.PopupMenuTool
dim std as Infragistics.Win.UltraWinToolbars.UltraToolbar
printButton.SharedProps.Caption = "Print Sales Oder Ack"
if tools.Tools.Exists("MyPrintTool") = false
tools.Tools.Add(printButton)
pop = CType(tools.Tools("ActionsMenu"), Infragistics.Win.UltraWinToolbars.PopupMenuTool)

pop.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase() {printButton})
Tools.Toolbars("Standard Tools").Tools.Add(printButton)
dim internalFunctionImage As System.Drawing.Image = EpiUIImages.GetImage("Print")
dim appearance As New Infragistics.Win.Appearance
appearance.Image = internalFunctionImage
tools.Tools("MyPrintTool").SharedProps.AppearancesLarge.Appearance = appearance
tools.Tools("MyPrintTool").SharedProps.AppearancesSmall.Appearance = appearance

end if

if tools.Tools.Exists("SalesOrderPrintTool")
'//MessageBox.Show("SalesOrderPrintTool")
tools.Tools("SalesOrderPrintTool").SharedProps.Visible = false
end if
if tools.Tools.Exists("PrintTool")
'//MessageBox.Show("SalesOrderPrintTool")
tools.Tools("PrintTool").SharedProps.Visible = false
end if
return printButton
End Function

Sub DestroyCustomCode()


'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
'// Begin Wizard Added Object Disposal

edvOrderHed = Nothing
'// End Wizard Added Object Disposal
'// Begin Custom Code Disposal
removehandler printButton.ToolClick, addressof printClick
'// End Custom Code Disposal
End Sub

Private Sub printClick(sender As Object, e As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs)
oTrans.Update()
dim num as Integer = Integer.Parse(oTrans.CurrentOrderNum)
If (num > 0) Then
Try
Dim options2 As New LaunchFormOptions()
options2.SuppressFormSearch = True
options2.ValueIn = num.ToString

ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UIRpt.SalesOrderAck", options2)
Catch
End Try
End If
End Sub

Private Sub edvOrderHed_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvOrderHed.EpiViewNotification
'// ** Argument Properties and Uses **
'// view.dataView(args.Row)("[FieldName]")
'// args.Row, args.Column, args.Sender, args.NotifyType
'// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
If (args.NotifyType = EpiTransaction.NotifyType.Initialize) Then
If (args.Row > -1) Then
tools.Tools("MyPrintTool").SharedProps.Enabled = view.dataView(args.Row)("ReadyToCalc")
End If
End If
End Sub


End Module


--- In vantage@yahoogroups.com, "Mark Wonsil" <mark_wonsil@...> wrote:
>
> Brian wrote:
> > Yes unfortunately the BOs do not expose an OnPrint() event handler.
> >
> > Seems like this would be a nice feature to add to the
> > Business Object Layer in Vantage. The handlers wouldn't have
> > to *do* anything except get fired before the handoff to the
> > print routines, but they'd give BPM authors a place to insert
> > messages and exceptions, etc.
>
> As I mentioned in a different post, Epicor 9 has added Data Directives to
> the BPM model. This allows one to trigger on the
> addition/deleting/modification of a record in a table. Could one look at the
> SysRptLst table and do something? I haven't tried but it may be a
> possibility.
>
> I made a suggestion to Epicor to introduce Process Directives so that one
> could do pre-post processing on print jobs, cost rollups, scheduling, MRP,
> etc. No word back but maybe if others chirped in...
>
> Mark W.
>
All,
Calculate tax set to true is really slowing down our sales order entry. (several seconds per Order detail). The solution appears to be to leave calc taxes off, and then manually set it as part of their procedure after the order is completely entered. Of course, we all know they will forget. (humans...)
We need a BPM that won't allow us to print a sales order Acknowledgement unless "calculate tax" is true. Looking through the method directives, I have no clue what to attach to. Epicor told me this was my best option for making sure they click the calc tax box, but didn't tell me HOW to do this. (I suspect contract support will be offerred soon.)
Any suggestions or assistance on how others (how best to) handle this would really be appreciated!
- leAnn
We have the same problem and also would be interested in a solution to this one.





--- In vantage@yahoogroups.com, "leann_37" <lmarruffo@...> wrote:
>
> All,
> Calculate tax set to true is really slowing down our sales order entry. (several seconds per Order detail). The solution appears to be to leave calc taxes off, and then manually set it as part of their procedure after the order is completely entered. Of course, we all know they will forget. (humans...)
> We need a BPM that won't allow us to print a sales order Acknowledgement unless "calculate tax" is true. Looking through the method directives, I have no clue what to attach to. Epicor told me this was my best option for making sure they click the calc tax box, but didn't tell me HOW to do this. (I suspect contract support will be offerred soon.)
> Any suggestions or assistance on how others (how best to) handle this would really be appreciated!
> - leAnn
>
There is no trigger on Print SOA maybe put the BPM on Save? I do't see any
other trigger you can stick this onto.
Sincerely
Jose C Gomez

http://www.josecgomez.com


On Wed, Aug 12, 2009 at 8:43 AM, pklein256 <pklein@...> wrote:

>
>
> We have the same problem and also would be interested in a solution to this
> one.
>
> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com>, "leann_37"
> <lmarruffo@...> wrote:
> >
> > All,
> > Calculate tax set to true is really slowing down our sales order entry.
> (several seconds per Order detail). The solution appears to be to leave calc
> taxes off, and then manually set it as part of their procedure after the
> order is completely entered. Of course, we all know they will forget.
> (humans...)
> > We need a BPM that won't allow us to print a sales order Acknowledgement
> unless "calculate tax" is true. Looking through the method directives, I
> have no clue what to attach to. Epicor told me this was my best option for
> making sure they click the calc tax box, but didn't tell me HOW to do this.
> (I suspect contract support will be offerred soon.)
> > Any suggestions or assistance on how others (how best to) handle this
> would really be appreciated!
> > - leAnn
> >
>
>
>


[Non-text portions of this message have been removed]
Yes unfortunately the BOs do not expose an OnPrint() event handler.

Seems like this would be a nice feature to add to the Business Object Layer in Vantage. The handlers wouldn't have to *do* anything except get fired before the handoff to the print routines, but they'd give BPM authors a place to insert messages and exceptions, etc.

-bws

--
Brian W. Spolarich ~ Manager, Information Services ~ Advanced Photonix / Picometrix
    bspolarich@... ~ 734-864-5618 ~ www.advancedphotonix.com


-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez
Sent: Wednesday, August 12, 2009 8:56 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Re: BPM needed

There is no trigger on Print SOA maybe put the BPM on Save? I do't see any
other trigger you can stick this onto.
Sincerely
Jose C Gomez

http://www.josecgomez.com


On Wed, Aug 12, 2009 at 8:43 AM, pklein256 <pklein@...> wrote:

>
>
> We have the same problem and also would be interested in a solution to this
> one.
>
> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com>, "leann_37"
> <lmarruffo@...> wrote:
> >
> > All,
> > Calculate tax set to true is really slowing down our sales order entry.
> (several seconds per Order detail). The solution appears to be to leave calc
> taxes off, and then manually set it as part of their procedure after the
> order is completely entered. Of course, we all know they will forget.
> (humans...)
> > We need a BPM that won't allow us to print a sales order Acknowledgement
> unless "calculate tax" is true. Looking through the method directives, I
> have no clue what to attach to. Epicor told me this was my best option for
> making sure they click the calc tax box, but didn't tell me HOW to do this.
> (I suspect contract support will be offerred soon.)
> > Any suggestions or assistance on how others (how best to) handle this
> would really be appreciated!
> > - leAnn
> >
>
>
>


[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/.
(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
Brian wrote:
> Yes unfortunately the BOs do not expose an OnPrint() event handler.
>
> Seems like this would be a nice feature to add to the
> Business Object Layer in Vantage. The handlers wouldn't have
> to *do* anything except get fired before the handoff to the
> print routines, but they'd give BPM authors a place to insert
> messages and exceptions, etc.

As I mentioned in a different post, Epicor 9 has added Data Directives to
the BPM model. This allows one to trigger on the
addition/deleting/modification of a record in a table. Could one look at the
SysRptLst table and do something? I haven't tried but it may be a
possibility.

I made a suggestion to Epicor to introduce Process Directives so that one
could do pre-post processing on print jobs, cost rollups, scheduling, MRP,
etc. No word back but maybe if others chirped in...

Mark W.