Event filter for user form
I tried to use the new method (AddEx) in event filter class to add filter to form that I've created myself by referring to formtype, but there is no filter done on this form. Anyone has encountered this problem before?
The code to create the user form is
Dim oCreationParams As SAPbouiCOM.FormCreationParams
oCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed
oCreationParams.UniqueID = "MySimpleForm"
oCreationParams.FormType = "MyForm"
oForm = SBO_Application.Forms.AddEx(oCreationParams)
'// add a User Data Source to the form
oForm.DataSources.UserDataSources.Add("EditSource", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20)
oForm.DataSources.UserDataSources.Add("CombSource", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20)
'// set the form properties
oForm.Title = "Simple Form"
oForm.Left = 400
oForm.Top = 100
oForm.ClientHeight = 80
oForm.ClientWidth = 350
The code to add event filter is:
oFilter.AddEx("139") 'Orders Form
oFilter.AddEx("MyForm") 'my form
oFilter = oFilters.Add(SAPbouiCOM.BoEventTypes.et_KEY_DOWN)
This code is not working.
Similar Messages
-
Only an Event Filter for my Addon !?
hi,
is it possible to set the event filter only for my addon and not for standard function or other addons ?
in my addon i'm usin a crystal report viewer. So i catch the Menu_CLICK-event 519 (preview) and 520 (print)
But when i use the event filter on a special form, the event Filter is set for the whole Business One.
For example, i set my filter on form 139. But if the user print on other forms (140, 133,...) the standard PLD should work !
What is going wrong?
oFilters = New SAPbouiCOM.EventFilters()
oFilter = oFilters.Add SAPbouiCOM.BoEventTypes.et_MENU_CLICK)
oFilter.AddEx("139") 'Formular
moSBOApplication.SetFilter(oFilters)
regards
MarkusHi Rasmus,
thanks for help. Everything works fine now. I made some mistakes with the bubbleevent
thanks
Markus -
Approval Procedure for User Form
Dear All,
I am developing a Requisition add-on. It contains 2 stages. First user creates a requisition & then the authorized person approves this requisition. My problem is that when user creates a requisition, an automatic alert should be on the authorized person side. I can use Alert for this process. But my client wants the same functionality as the Approval Procedure in Admin Module. Can I use the approval procedure for the add-on forms also. ? If yes, then how can I do that because Approval Procedure does not show the user form. Help me regarding this. Any reply would be appreciated.Hi,
Approval Procedure is not available to User Form. You may try to create the similar process by SDK but that needs too much coding.
Thanks,
Gordon -
Blank Event Filter for Receive Event Activities: OK?
I've defined an event group that is linked to multiple Raise events.
My event subscription is linked to this event group, and launches a workflow process when one of the event group's events is raised.
What's bothering me is that in Oracle Workflow Builder, for the Receive event activity, since I can accept one of any several events, I have to leave the Event Filter field blank. From the Oracle Workflow Guide, chapter 4, section "To Create an Event Activity":
"Note: You can only specify an individual event as the event filter. The event filter cannot be an event group."
OK, so that means I have to leave my Receive event's Event Filter field blank. I'm not inviting unwanted events this way, correct? Do I have to code to prevent this workflow process from executing a "rogue" Raise event?
This might be a silly question.
Thanks,
Art.Mike,
any chance a future DPM version can/will leverage SQL Management studio/SQL Agent for backup job scheduling ? I am sure many DPM admins who (may) know the significantly greater scheduling flexibility of SQL server agent would love to
see this happen.
The proposed workaround would require to build at least 6 additional filters (given the current filter uses the allowed max 7 days) and during 2 weeks in the year the unaware/unprepared DPM admin - may perceive the mmc crash as the beginning of the
end.
Please tell me someone is willing to look at the source code to get this remedied. I know this cant be a SQL problem since SQL server agent jobs run fine time change or no time change.
Thanks for your ongoing help already.
Sassan
Sassan Karai -
Can I enable menu for base document and target document for user forms
Hello friends
I want to add Base and target document functionality for our addon
but when i do this
oform.EnableMenu("5899", True) ' 5899 is menu uid for target document
i got this exception
Menu - Not found [66000-27]
Is there another way around
Thanks in advance ....
AtulAtul try adding this to ur form Xml schema and specify the userdatasrc(bold text) for the form as well..
<item uid="10000329" type="113" left="475" tab_order="0" width="90" top="481" height="19" visible="1" enabled="0" from_pane="0" to_pane="0" disp_desc="0" right_just="0" description="" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1">
<AutoManagedAttribute />
<specific AffectsFormMode="1" TabOrder="0">
<ValidValues>
<action type="add">
<ValidValue value="A/R Credit Memos" description="14" />
</action>
</ValidValues>
<b><databind databound="1" table="" alias="SYS_312" /></b>
</specific>
</item>
<item uid="10000330" type="113" left="380" tab_order="0" width="90" top="481" height="19" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="0" right_just="0" description="" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1">
<AutoManagedAttribute />
<specific AffectsFormMode="1" TabOrder="0">
<ValidValues>
<action type="add">
<ValidValue value="Sales Quotations" description="23" />
<ValidValue value="Sales Orders" description="17" />
<ValidValue value="Deliveries" description="15" />
</action>
</ValidValues>
<b><databind databound="1" table="" alias="SYS_313" /></b>
</specific>
</item> -
How to get next series number for user form?
Hi,
I am using UDO for my form with Manage series inorder to maintain automatic documnet number.
Like sales order screen if u open the form it should display with next generated document number.
In my form it is not displaying the next number
I want to display primary as selected and next series number.Please help me.
I have used the following code
If (FormUID = "FM_PURCHASEINDENT") And (pVal.ItemUID = "SerName") Then
If (pVal.EventType = SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) And (pVal.Before_Action = True) Then
Dim oForm As SAPbouiCOM.Form
Dim oComboBox As SAPbouiCOM.ComboBox
Dim oEditText As SAPbouiCOM.EditText
Dim str As String
Dim lNum As Long
oForm = SBO_Application.Forms.Item(FormUID)
oComboBox = oForm.Items.Item("SerName").Specific
str = oComboBox.Selected.Value
'SBO_Application.MessageBox("Selected Series: " & str)
'// The following method provides the next value of the series
lNum = oForm.BusinessObject.GetNextSeriesNumber(CLng(str))
oEditText = oForm.Items.Item("SrValue").Specific
oEditText.String = lNum
oForm.Update()
End If
End If
Regards
JambuHi,
This is a little example for UDO with series (www.expertone.es/ficheros/SIMPLE_UDO.rar)
Code in Vb6.0
<b>Public Sub Load_UDO(ByRef rsbo As SAPbouiCOM.Application)</b>
Dim oFormParams As SAPbouiCOM.FormCreationParams
Dim oForm As SAPbouiCOM.Form
Dim oCombo As SAPbouiCOM.ComboBox
Set oFormParams = rsbo.CreateObject(cot_FormCreationParams)
oFormParams.XmlData = DameXML(App.Path & "XMLEXO_UDO.srf")
Set oForm = rsbo.Forms.AddEx(oFormParams)
'Load series in combo
Set oCombo = oForm.Items("EXO_CBO1").Specific
<b>oCombo.ValidValues.LoadSeries oForm.BusinessObject.Type, sf_Add</b>
oCombo.Select 0, psk_Index
RellenarNumDoc rsbo, oForm
oForm.Visible = True
End Sub
<b>Private Sub RellenarNumDoc(ByRef rsbo As SAPbouiCOM.Application, ByRef rForm As SAPbouiCOM.Form)</b>
With rForm.DataSources.DBDataSources("@EXO_OUDO")
.SetValue "DocNum", .Offset, CStr(rForm.BusinessObject.GetNextSerialNumber(rForm.Items("EXO_CBO1").Specific.Selected.Description))
End With
End Sub
Private Function DameXML(ByVal vsRuta As String) As String
Dim xmlDoc As New MSXML2.DOMDocument
xmlDoc.Load vsRuta
DameXML = xmlDoc.xml
End Function -
How to write an JavaScript Event Handler for Portal Form?
I have created an form in Portal builder.
There are two column, R04 and R05.
I need to use Javascript Event Handler to check if R04 value is smaller than R05 value.
Can I be able to build up this function?
Can anyone give me a hint? or steps?
ThanksHere are some suggestions.
1. do what we did, and write your own protocol server that understands whatever custom commands you need, and then write a custom thin client which will send commands to and receive responses from this protocol server. you can use any language for the client software. the protocol server should be written in java so that it can receive commands from the client and then use the 9iFS API to execute the requests or retrieve the data that the client wants to display.
2. write a custom fat client, in java, that accesses the 9iFS API directly. this means that each client will be accessing the iFS schema on the database machine directly. if you configure the iFS service on the client to use the THIN driver, then you won't need to install the Oracle client software on the client machine. You'll just need all the iFS .jar files and the database's JDBC driver (classes12.zip). Note that using the THIN driver is not supported because of bugs and performance problems. If you use the OCI8 driver, which is supported, then you'll have to install the whole Oracle client software package on the client machine.
3. write a thin client that uses the WebDAV protocol, and communicate with our built-in DAV server. this approach will allow you to execute any command that DAV understands. you may be able to find some free HTTP or DAV client software on the net, or you can try writing it yourself. this is probably a better solution than number 1 unless you really need to send custom commands that are not in our DAV server's vocabulary. -
How to develop Document approval stages for user forms
Hello friends
I want to apply document approval stages to one of my documents
how it can be done
i want it to be something like purchase order .
Thanks in advance,
AtulHi,
First of all go to the general settings and click Apply Approval Procedures.
Before creating a Approval Procedure - the following points have to be clear
1) Number Of Approvals.
2) Who will authorise it.
3) Which Documents are to go for Approval.
4) Who is the originator of the document.
Then go to the Administrator Module - Approval Procedures.
The first stage speaks as to the details metioned in Point 1.
The rest is as above.
A super user cant have approval procedures. -
Hello,
I'd like to know if somebody find a solution for the font size issue on user form.
since BO 2005, the user can change the font size. the application will format all the controls of form with the good size.
However, the layout does not follow very well for user form.
If the font size is changed while a user form is open, the aplication will reformat it perfectly, the controls are bigger, and the distance between the controls are ok
But when the user form is open again, it keeps the distance and control size of the XML file but change the font size, so the layout is very bad, sometime the static text or the caption could not be read, so it's not possible to use the form as is.
I use XML to create form, I haven't try by code, but in my case, I can't use code because there are a lot of controls in the form.
Any idea if it's possible to call the Business One procedure to resize the form and its control (not only the font) ?
Thanks youTry resetting the FontSize of all items (and columns) to the one you used for the design after loading the form.
I use a simple loop over all items and an inner loop for matrixes and grids to set the font size in their columns.
Now users can have a larger font, but the added forms will use the original design's font size.
This approach has some drawbacks:
- Added forms use a different font size
- Some of the controls will still get their size based on the system default font size
(checkboxes, drill-down arrays, headercolumns, perhaps more?).
- Focused item is not resized by this (so far I have been able to work around this).
- Changing the font size while the form is open, will break the design as the
font size does not change, but the control sizes do.
This is not an ideal solution, but it might give some help, until a better one presents itself.
If the users don't use a dramatically different font size, my form design work quite ok,
even with the drawbacks or at least it is better than nothing. It is a good idea to test
the form with different font sizes to make it more flexible.
Tero -
Multi Value User Defined field on OIM user form
Hi Everyone,
I have a requirement where i need to assign multiple resources to user as per access policy. These resources should be assign by virtue of some role (custom attribute as of now). The specific requirement is that one user may have multiple roles (and hence resources) and all these values should capture in any user defined field. As the requirement contains multiple Roles so we have to create multi-value user defined field for User form to capture all these role values under single attribute. Does OIM provides any such multi-value field OOTB (lookup, drop down--any customize way we can make them multivalue)?He's right. Multi Valued attributes on the User Profile are not available in OIM. If you want to do this, and you have a finite number of possible roles, you can create UDFs for each and map a checkbox or something to it if the user has that value. Then base your acccess policies off those.
-Kevin -
A database that contains data required for this form to function correctly cannot be found?
Hi,
In my scenario, i m trying to pull out data from sql server using windows authentication and display in infopath form.
I set some rules in textbox control change that retrieve data from sql database.
and I have enabled cross domain data access for user form .
and i have stored the connection file into the connection library and i have approved.
The form working fine in server (browser), but whenever i m trying to open the form in client browser i m getting the below error.
please assist me to resolve this error.
venkateshrajanHi,
Please make sure following options are enabled in Central Administration > General Application
Settings > InfoPath Forms Service > Configure InfoPath Forms Services.
1) Allow user form templates to use authentication information contained in data connection files.
2) Allow cross-domain data access form user form templates that use connection settings in a data connection file.
(-This you have done)
Do you use host name to access the data source? If yes, please
check of the DisableLoopback check is enabled. Please make sure the loopback check is disabled on all SharePoint servers and reboot server to test if it works.
http://support.microsoft.com/kb/896861
Please refer this link with similar problem
Hope it helps!
Thanks,
Avni Bhatt -
I would like to make ONE event-handler for users who
- presses Return/Enter from a field or
- uses the mouse to jump to another field or
- uses the tab-key to jump to another field.
Can this be handled by using only one event-handler, ex. focusLost ?
I appreciate your answer.
Have a nice day.I used a single FocusListener with 3 different TextFields to select all the text in a TextField whenever the TextField gained focus, plus updated the other 2 TextFields based on the contents of the third when the third lost focus. Is that like what you are looking for?
-
[Server 2008R2] Filter event logs for logged in users from clients on domain
Hi All,
I am looking for a script which can be run on a domain controller to check which user accounts logged in on the domain. I am looking for both the username and client. Reason why I need this is to check where service accounts are used.
Thanks.
Kind regards,
Bart
Bart Timmermans | Consultant at inovativ
Follow me @
My Blog | Linkedin |
Twitter
Please mark as Answer, if my post answers your Question. Vote as Helpful, if it is helpful to you.Hi Bart,
To parse the event log, you can refer to the cmdlet "Get-WinEvent", and how to use this cmdlet to parse event log, please check this article, you can also add the "-computername" to query event log from remote computers:
Use PowerShell Cmdlet to Filter Event Log for Easy Parsing
To monitor the logon history, please check this function to start:
function Get-Win7LogonHistory {
$logons = Get-EventLog Security -AsBaseObject -InstanceId 4624,4647 |
Where-Object { ($_.InstanceId -eq 4647) -or (($_.InstanceId -eq 4624) -and ($_.Message -match "Logon Type:\s+2")) -or (($_.InstanceId -eq 4624) -and ($_.Message -match "Logon Type:\s+10")) }
$poweroffs = Get-EventLog System -AsBaseObject -InstanceId 41
$events = $logons + $poweroffs | Sort-Object TimeGenerated
if ($events) {
foreach($event in $events) {
# Parse logon data from the Event.
if ($event.InstanceId -eq 4624) {
# A user logged on.
$action = 'logon'
$event.Message -match "Logon Type:\s+(\d+)" | Out-Null
$logonTypeNum = $matches[1]
# Determine logon type.
if ($logonTypeNum -eq 2) {
$logonType = 'console'
} elseif ($logonTypeNum -eq 10) {
$logonType = 'remote'
} else {
$logonType = 'other'
# Determine user.
if ($event.message -match "New Logon:\s*Security ID:\s*.*\s*Account Name:\s*(\w+)") {
$user = $matches[1]
} else {
$index = $event.index
Write-Warning "Unable to parse Security log Event. Malformed entry? Index: $index"
} elseif ($event.InstanceId -eq 4647) {
# A user logged off.
$action = 'logoff'
$logonType = $null
# Determine user.
if ($event.message -match "Subject:\s*Security ID:\s*.*\s*Account Name:\s*(\w+)") {
$user = $matches[1]
} else {
$index = $event.index
Write-Warning "Unable to parse Security log Event. Malformed entry? Index: $index"
} elseif ($event.InstanceId -eq 41) {
# The computer crashed.
$action = 'logoff'
$logonType = $null
$user = '*'
# As long as we managed to parse the Event, print output.
if ($user) {
$timeStamp = Get-Date $event.TimeGenerated
$output = New-Object -Type PSCustomObject
Add-Member -MemberType NoteProperty -Name 'UserName' -Value $user -InputObject $output
Add-Member -MemberType NoteProperty -Name 'ComputerName' -Value $env:computername -InputObject $output
Add-Member -MemberType NoteProperty -Name 'Action' -Value $action -InputObject $output
Add-Member -MemberType NoteProperty -Name 'LogonType' -Value $logonType -InputObject $output
Add-Member -MemberType NoteProperty -Name 'TimeStamp' -Value $timeStamp -InputObject $output
Write-Output $output
} else {
Write-Host "No recent logon/logoff events."
Get-Win7LogonHistory
Refer to:
https://github.com/pdxcat/Get-LogonHistory/blob/master/Get-LogonHistory.ps1
If there is anything else regarding this issue, please feel free to post back.
If you have any feedback on our support, please click here.
Best Regards,
Anna Wang
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
How to handle form close event or escape key press event for user defined f
Experts,
Please let me know how to handle form close event or escape key press event for user defined form...
Thanks & Regards,
Pravin.Hi
You can catch the form close event like this
If ((pVal.FormType = 139 And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_CLOSE)) And (pVal.Before_Action = True)) Then
Try
SBO_Application.SetStatusBarMessage(pVal.EventType.ToString())
Catch ex As Exception
SBO_Application.SetStatusBarMessage(ex.Message)
End Try
End If
Hope this helps
Regards
Arun -
Filter Data with Date range.Dates are selected in user form
Does anybody could help me to create a user form, that user could select the date and time from either calendar or other control button (from Userform control Toolbox) and the VBA code would filter the data on Excel SpreadSheet depending on input...
I want user to specify start time and the end time, that I would know the period of time which is on interest and filter the data depending on inputs...
This is part of my table on Sheet1:
ID Time
Products
ProdNoExit
8
04-06-2013 23:00
15
1
8
04-06-2013 23:30
205
1
8
05-06-2013 00:00
235
1
8
05-06-2013 00:30
587
1
8
05-06-2013 01:00
874
1
8
05-06-2013 01:30
155
1
8
05-06-2013 02:00
150
1
8
05-06-2013 02:30
258
1How about this?
Right-click your tab name, and paste this code into the window that opens.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Address = "$A$1" Or _
Target.Address = "$G$1" Then
Range("Database").AdvancedFilter _
Action:=xlFilterInPlace, _
CriteriaRange:=Range("Criteria"), Unique:=False
End If
End Sub
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.
Maybe you are looking for
-
754 Ultra MS-6561 Windows crash and now sometimes doesn't POST
Bought a new MSI motherboard and installed everything that's in my signature. Everything is used except for the memory and the mobo. The computer was running fine for a few weeks. No problems. Only recent installation is an old game: Independence W
-
Mail not being received.
Hello Everyone, I've been helping my aunt with her MacBook anytime she encounters an issue. She doesn't do all the fancy programing or sets specific settings to customize her laptop. All she uses it for is music, internet, facetime, mail, and occasio
-
rite was watching a video on me fone and all of a sudden it apeared to switch off, the screen went black when it lit up again the LCD screen had cracked. I hope u no wat i mean the black liquid crystals sprayed uot up the middle of the screen. Will N
-
Too many SMTP connections kills server?
I have a client who until recently had an old G4 server running 10.2.8. This server crashed regularly, usually when they sent out their email mailshot. I recently put in a new G5 running server 10.4.5 and all seemed well until they sent out the next
-
this is my first time using pages i wanna know how double space my work using pages??