Problem catching events after opening system form
Hi
In my addon i open a system form from a user form. after closing the system form , my user form does not cause any event to be handled by my addon. in other words pressing on the forms button items does not cause any event to accure. in order for the form to work i need to close the form and reopen it from the menu. question is how can i know what is causing the form to stop responding and how can i fix it?
appreciate the help
Yoav
Hi Yoav,
It looks like when the system, form closes you remove a filter for your user form or your remove the listener for your user form.
Regards
Ad
Similar Messages
-
Problem writing XML after opening dialog
I'm using ScriptUI to create and update XML in a document (using Document.XMLElements methods).
Before opening a Window with ScriptUI, I can read and write XML without problem.
But after opening a Window containing some ScriptUI resources, I can only read the existing XML BUT NOT WRITE IT!
My writing method is called from a button event :
var myXMLRootNode = /* instanciated */
myWindow.okButton = /* instanciated */
myWindow.okButton.onClick = function() { myXMLRootNode.xmlElements.add(myTag, object) };
myWindow.show();
It looks like the onClick callback works OK for reading (I can recover all existing values without problem) but not for writing.
Any idea ?Hey!
Well, the thing is that you have to close dialog first before writing to document.
myWindow.okButton.onClick = function(){myWindow.close(1);};
var myWin = myWindow.show();
if(myWin == true){
myXMLRootNode.xmlElements.add(myTag, object);
Hope it helps!
tomaxxi
http://indisnip.wordpress.com/ -
Open system form on button click
Hello Expert,
How to open system form(invetery transfer from) on button click
Regards,
Abhinav LalpurwalaHi Abhinav
Try This.....
'In Button pressed event
sbo_application.ActivateMenuItem("3080") 'For Inventory Transfer form
Thanks
Shafi -
Hi Dear;
what is the .net code to open a system form from another one?
by example: i want to open a/r invoice from business partners form.
thank you Dear.Hi Dany,
You only need to "simulate" the way you would do it using the B1 GUI:
You will click on the Invoice menu, so:
Me.SboApplication.ActivateMenuItem("InvoiceMenuID")
PS:Invoice MenuUID is 2053
Hope helps,
Ibai Peñ -
Opening system forms without menu
Hi All,
Does there exist code to open a system form, like the Production Order, without activating the menu item that calls it? For example, I would like to open a production order form with a given instance? The reason for this is that I need to open the form and then load it with a specific production order. Because it is possible for there to be any number of production order forms open simultaneously at any given time, I need to know the exact form I had just opened in order to load it.
Is this possible?
Thanks,
MikeHi Mike,
it's possible, I guess.
But you have to the actual operation of opening form and finding production order by addon.
You can use 'activate menuitem' clause, first.
then you should enter the number of the production order which you want to open to the order number field in number field. (you can do it via handling UI items.) then use the 'click' method of the item number "1". it's generally possible. I did it sometimes.
Hope this useful for you. -
Problem catching events from my ComboBoxItemRenderer
Hi all,
I have a problem catching a custom event dispatched by my
custom ComboBoxItemRenderer. In the renderer I dispatch an event as
follows:
dispatchEvent(new Event("smallTest",true,true));
As this is a bubbling event i expected to be able to catch it
in one of the parent containers. However, the opposite is true.
Then, lowering my goals i tried to catch the MouseEvent.CLICK event
raised by the button in the ComboBoxItemRenderer. I failed in the
same way...
Somebody has a clue? Thanks in advance!
(the following is an isolated description of my small problem
The Mainapp
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="init()" layout="absolute" xmlns:local="*">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.collections.ArrayCollection;
[Bindable]
public var aDataProvider:ArrayCollection = new
ArrayCollection(
[ {label:"one", data:1},
{label:"two", data:2},
{label:"three", data:3} ]);
private function init() : void {
addEventListener("smallTest", doAlert);
private function doAlert(event : Event) : void {
Alert.show("yo");
]]>
</mx:Script>
<mx:ComboBox id="cb" itemRenderer="ComboBoxItemRenderer"
dataProvider="{aDataProvider}" width="200"/>
</mx:Application>
The Renderer
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="
http://www.adobe.com/2006/mxml"
width="100%">
<mx:Script>
<![CDATA[
import mx.core.Application;
private function doClick() : void {
dispatchEvent(new Event("smallTest",true,true));
]]>
</mx:Script>
<mx:Label color="red" text="{data.label}"/>
<mx:Spacer width="100%"/>
<mx:Button label="*" width="40" click="doClick()"/>
</mx:HBox>Listening from the combobox (cb) didn't work. Found out that
the hierarchical parent list from the view of the itemrenderer was
as follows:
List18.ListBaseContentHolder21
List18
[object _ComboboxTest_mx_managers_SystemManager]
[object Stage]
For now, i managed to fix the problem by listening from the
systemManager but this is more like a hack. -
How Can i Get the reference of currently opened System form
Hi Experts,
I have a scenario in which i need the reference of currently opened SAP form The code is like
SAPbobsCOM.ProductionOrders op = null;
op = (SAPbobsCOM.ProductionOrders)SBO_Company.GetBusinessObject(BoObjectTypes.oProductionOrders);
now i want some logic like
op=currently opened production order in sap
so that i can edit the fields of that order
Thanks AmitHi Amit
You can access the currently opened form using this
for getting the active form
Dim oForm As SAPbouiCOM.Form= Sbo_Applicaion.Forms.ActiveForm
for getting the form using form type and count
Dim oForm As SAPbouiCOM.Form= Sbo_Applicaionl.Forms.GetFormByTypeAndCount("133", 0)
Hope this helps
Regards
Arun -
Open system form and update data
Hi
any body can help me with the code to do the following?
open users form with current user, update the default group and save the record and close the form.
but in hidden mode
10x in advanceAndrea,
To Do? Clicking on a Button on Sales Order -> Opens a PO form, and selects the row?
In the eventhandler of a button click if the PO is not linked to SO by SAP B1 standard functionality
step 1. call ActivateMenu ("2305") of Sbo_application , this opens the PO form
step 2. Change the form to Find mode
step 3. enter po number to the Item UID "8" which is the document number.
step 4. Send enter key, or Clikc On button UID "1" which finds the PO
step 5.read the value from SO form, from matrix "38" line where you selected
step 6. use the code above to locate the line in PO (use # column for position numbers which UID is 0)
at step 5, i think you should select a line from SO matrix which you would like to open.
IN sales order, If you used PO chekcbox on logistics tab to create the PO, you can find a direct link between PO and SO (only in docentries are linked not positions) on sales order, Column UID 158 field name: potrgnum. If this connection is exists, you have an easy way:
SO form, when a user clicks on COlumn 158 (po number), you can implement an eventhandler, which
step 1.read the value from SO form, from matrix "38" line where you selected
step 2. use the code above to locate the line in PO (use # column for position numbers which UID is 0)
By processing theses steps, you can build up you solution.
Regards
János -
How to catch events on user tables forms?
Hi all,
Is there any way to catch the events on user defined tables' form which opens from Tools-User Tables? The form Id we get is not unique so we can't initialize the form with that ID or put it in an If loop for pval.formUId.
any clues?
Thanks in advance.....Hi Binita,
The UDT form should have a form type in the format:
110xxx
where xxx is the value in the TblNum field in the OUTB table (eg 110015 if the TblNum field is 15).
Therefore, you can query the OUTB table for your UDT name and get the correct TblNum value and then calculate the correct form type for your table. If you want to filter events then you'll need to run this query as your addon starts and dynamically add the correct event types and filters to your addon.
Kind Regards,
Owen -
After opening HFM forms in excel the colour in all other file get changed
Hi,
Once we open (import) HFM web form in excel via smartview and refresh it, color in all other excel files (normal excel file) change to black and we have to close all the excel file to to get rid of this issue. Its happening onlywith few users. Is there any setting in excel or in hyperion smartview to fix this problem?
Thank you in advance for your help.
Regards,
AjI also think its not SV related issue and it is purely excel issue. I checked all the options in excel but could not find what causes such changes. Only some users are facing such problem and all the excel option setting are identical in two computer one with problem and other without any such problem.
Regards,
Aj -
IMovie -Problem restoring events after external hard drive failed.
iMovie 09 – The external hard drive failed where I stored my 2012 events. I do not have a backup copy of these events. I bought a new external drive and named it exactly the same as the old drive. Then I uploaded archived original video clips to it recreating the events. I used the exact same event names. However when I view the projects I made from the original events, I get “this clip’s media file is not currently available”. The file path I created should be the same as the old, so why does the project not recognize the recreated events? Any suggestions what I could try?
If I were able to retrieve and copy the old events from the failed drive to the new drive, would that work?
Has anyone successfully dealt with this problem?That's a very interesting scenario that you've described. I've been concerned about a potential situation arising where I may need to restore Events from a backup drive. However, your situation is somewhat different in that you've had to re-import the Events to a new drive from an archive.
My main video drive is a Maxtor One Touch III Turbo comprising two 500GB drives set up as a RAID 0. So, effectively it appears as one drive totalling 1TB, with data being written to both drives simultaneously (but not mirrored). However, if one drive fails, the other becomes ineffective as it contains only partial data about imported clips (the remaining data being on the failed drive).
I backup the Maxtor to a portable 1TB drive by cloning it using SuperDuper. My thinking has been that, if the Maxtor fails then a simple rename of the backup drive to the same name as the Maxtor is all that will be required for iMovie to retain the linkages between Events and Projects. I hope this is the case!
I hope you get a solution to your predicament - sorry I can't offer any useful advice!
John -
Open system form and select a row number on matrix by click on button
Hi experts,
I have to open the purchase order form and select a specific row number from the matrix by clicking a button on sales order form.
is it possible ?
can anyone help me to achieve it?
Thanks in advance.
Best regards
AndreaAndrea,
To Do? Clicking on a Button on Sales Order -> Opens a PO form, and selects the row?
In the eventhandler of a button click if the PO is not linked to SO by SAP B1 standard functionality
step 1. call ActivateMenu ("2305") of Sbo_application , this opens the PO form
step 2. Change the form to Find mode
step 3. enter po number to the Item UID "8" which is the document number.
step 4. Send enter key, or Clikc On button UID "1" which finds the PO
step 5.read the value from SO form, from matrix "38" line where you selected
step 6. use the code above to locate the line in PO (use # column for position numbers which UID is 0)
at step 5, i think you should select a line from SO matrix which you would like to open.
IN sales order, If you used PO chekcbox on logistics tab to create the PO, you can find a direct link between PO and SO (only in docentries are linked not positions) on sales order, Column UID 158 field name: potrgnum. If this connection is exists, you have an easy way:
SO form, when a user clicks on COlumn 158 (po number), you can implement an eventhandler, which
step 1.read the value from SO form, from matrix "38" line where you selected
step 2. use the code above to locate the line in PO (use # column for position numbers which UID is 0)
By processing theses steps, you can build up you solution.
Regards
János -
Jsp page getting error when opened after opening a form
Hi,
I have created an OA page, there is a link and a button in this page.
Whenever I click on the link, a standard jsp page will be opened in a new window.
When the button is clicked a standard form will be opened.
But when I click the button, and then click on the link then an error page is getting displayed with 'Logged in user does not have permission to access this page.' message.
Please help me on this.
Thanks.But when I click the button, and then click on the link then an error page is getting displayed with 'Logged in user does not have permission to access this page.' message.
Do you mean to say that the link works if you click on it without clicking on the button? The jsp you are talking about is a seeded one or a custom? --Shiv -
Catch events in each class/form
Hi, i'm developing an ADD-ON with VB6 and SAP B1 2005 A.
I instantiate a public SAPbouiCOM.Application object.
I'd like to pass it to my classes(one for each form) to manage in each class only events regarding that form to keep code cleaner.
So i did:
'In my class/form named 'clsSAPUI_Turni'
Private WithEvents m_SAP_Application As SAPbouiCOM.Application
Public Property Let SAP_Application(ByVal pSAP_Application As SAPbouiCOM.Application)
Set m_SAP_Application = pSAP_Application
End Property
Private Sub m_SAP_Application_ItemEvent(ByVal FormUID As String, pVal As SAPbouiCOM.IItemEvent, BubbleEvent As Boolean)
End Sub
'Externally:
Set oForm = New clsSAPUI_Turni
oForm.SAP_Application = SBOFormApplication
oForm.Show
The ItemEvent event only triggers for LOAD, GOTFOCUS and ACTIVATE events but suddenly i receive no more notifications. For example click event doesn't fire.
I didn't make any event filters yet.
On the other side, events on my SBOFormApplication public object they all trigger.
Why?
Can anybody help me?
Thanks
PaoloSorry,
i did a stupid mistake.
I declared locally class instance variable....
sorry for wasting you time.
Paolo -
Opening system form on button click
I have a user button on Sales Opportunity form.
On click of button, I want to open the respective Sales Quotation form.
The sales quotation for the corresponding docnum should be opened. DocNum is defined at the Stages tab on Sales Opportunity form.
Please provide the solution ASAP.Hi,
I think your discussion should be posted at SDK forum. Please repost in,
SAP Business One SDK
Thanks & Regards,
Nagarajan
Maybe you are looking for
-
POI getCellStyle and empty string problem
I'm having a problem getting the style of a cell from and excel input file and setting to an output file. I also have a problem recognizing blank cells that are not null in the input file here is my code any help would be great. package Trace; import
-
I'm executing a process flow with several activities. After each activity I check for status and error out if the activity fails. If the activity succeeds I go on to the next activity. When I execute a map within the process flow, the process flow ex
-
Apple Support is saying my serial number is invalid, and I copied from the desktop itself. Any suggestions as to why this would happen?
-
I've got the latest ipad with up-to-date OS & recently purchased the Digital AV adapter so I could connect to tv via HDMI. I've just attempted to watch a video via my ipad onto a tv & it comes out all distorted with the wrong colour picture coming an
-
Unable to use place command in photoshop
I am unable to use the place command in photoshop cs5.5 since upgrading to mavericks. The window pops open briefly then shuts immediately. Photoshop hangs as it is still awaiting the action to complets. The same behavior exists when attempting to add