on 09-12-2008 10:27 PM
Hi Guys, hope u have some idea to stop this,
I'm making a Sales Quotation, i want to catch when the Sales Quotation is created i could leave the user his last document made.
I'm catching in the FORM_DATA_ADD of the form "149" in actionsuccess=true this, then i put the form mode in search mode, put the docnum created and make a click to the button "1" to search the document, this is working fine until Business One shots an event that clears the document again.
this is my function
Dim oDocXml As New Xml.XmlDocument
oDocXml.LoadXml(Evento.ObjectKey)
Dim oDoc As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oQuotations)
Dim DocNum As Long = oDocXml.InnerText
Dim oFormC As SAPbouiCOM.Form = Pappl.Forms.Item(Evento.FormUID)
oFormC.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE
oFormC.Items.Item("8").Specific.string = DocNum.ToString
oFormC.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular)
Once i do this click event B1 shots a FORM_DATA_LOAD and loads my document, I tried to let a bubbleevent=false after my function but still in some place B1 shots the clear event, can u help me how to stop this? if anyone knows..
Thanks in advance
NOTE: SB1 2005A PL36
Gabriel
use this procedure [SBO_SP_TransactionNotification] and change as per the ur requirement .
u can stop any thing using this procedure.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gabriel,
Perhaps you could open a new instance of the sales order form, use this to find the document that has just been created and then close the original form. In this way, you don't have to worry about the original form clearing.
Kind Regards,
Owen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can do this, but i think is waisted time for the user, at least i can make visible or not visible the forms, if nothing works i'll try this for last. Thank u for ur support.
If i make the order different, first try the standar and the pen the another one, when i close a standar window in the form_dataevent i get a dump error, this happens to you too?
I tried to do it in the StatusBarEvent to catch a success message from that form in the specific mode and i do my function to search for the last quotation but still the clear process of the create shoots, anyone have any more ideas? do i must report this to sap?
Because for my point of view the bubbleevent=false after the actionsuccess=true of the FormDataEvent doesn't works for me. It MUST stop anything that comes after the process and it does not.
Gabriel
Dear Gabriel,
I looked in the help files and found the following facts about the "BubbleEvent".
*****************************************************
A boolean value specifying whether or not the application will continue processing
this event. Available only when BeforeAction=True.
True - Default. The application continues processing this event regularly.
False - The application stops handling this event.
This lets you insert your own event handler before returning control to the application event handler, instead
of the application event handler, or after returning control to the application event handler.
******************************
Can I suggest you to try and use the BubbleEvent when BeforeAction=True and see if it helps your cause.
There is also another way to get the document number via the "GetNewObjectCode Method". Which is actually the recommended way of getting the last docuemnt that was added.
Let us know if the above does or does not help you.
Regards
Arshdeep
Hi Arshdeep, my problem is not to find the last document created, i'm okey with that, my problem is that i need to cancell the "Clear" form process that runs when a document is created.
IF its official that BubbleEvent just works in the BeforeAction=True, that is maybe for the FormDataEvent because i can use BubbleEvent=False in the ActionSuccess=True of an ItemEvent.
I need to stop the clear process, but i can't do it in the beforeaction=true of the DATA_ADD because the document is still not created, my solution was when i catch that document is created (ActionSuccess=True) i search for this document created by this user.
I have used the GetNewObjectCode but try this, two clients pressing the add button for the same kind of document at the same time, try it 3 times, maybe one u'll get the quotations inverted, i know because we tried this, the clean way to do this search i believe is in the FORM_DATA_ADD of the FormDataEvent because that event was shooted by that user (at least for the example i gave u never inverted the documents)
Thank you for your help, if u see anything new please let me know.
Gabriel
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.