on 2005 Dec 16 3:34 PM
I have a method in VB6 and SBO verstion 6.5 that needs to execute after a successful transaction takes place. For example, if a user is entering an AR Invoice, and they have fixed all errors handled by the Application, the AR Invoice is successfully posted to Business One and the process is complete. It is at this point that I need to trigger my method. I've not been able to determine to proper event to capture to do this. What have you guys found to be the best way to accomplish this?
Thanks Ibai,
Thats a good way to do it. Is there no way to do it through an add-on distributed to each client app? Just curious.
Also, I am not familiar the "sp_OACreate" and "sp_OAMethod" objects in the T-SQL script. Are these stored procedres, or are they a way in T-SQL to call methods that exist in a registered .dll file?
Thanks very much for the help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You could try catching the Create button click, and then get the last added document (there are some trouble with this about 2 users adding at the same time), and do what you need.
I prefer the other option.
Both methods are Transact SQL procedures, which are always avaiable within SQL Server.
Regards,
Ibai Peñ
Hi All,
I too want to implement the solution in .Net(in VB.Net)..
I tried to locate the thread id what you mentioned - 93601, but could not find it..
Can you please send me the C# sample code that you have?
Thank you!
-Geetha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want to implement a solution in .NET then you can use B1 DI Event Service.
This service wraps SBO_SP_TransactionNotification and offers you the possibility
to register .NET listeners to DB events.
You can find the service / samples / documentation here on SDN under Business
One SDK Samples.
Thank you so much!!
Please give me a small clarification -
If I use Event Service, I need to install it on all the client machines where the add-on is running & also in the Server (SQL Server) machine, right? (I need to start the service in Server also)
I just tried avoiding all this, since this will make me to travel to my customer's place..Anyway, avoiding event service does not seem to be working!!
Thank you once again for your reply.
-GS
Excellent solution. I appreciate your help with this, and can use the VB6 code sample as a framework.
The only question I'm left with is related to preference rather than the validity of the solution. I would prefer, if possible, to implement this solution using VB.NET. I created a class library project, and replicated the code in the sample using VB.NET with a few minor differences to account for the language version differences. I then used the "Regasm" utility included in the .NET SDK to register the assembly, similar to the Regsvr32 command for VB6 assemblies. Given this scenario, the VB6 components logs entries properly while the .NET assembly does not. With the .NET assembly I get no error messages, and the log file is not created. Has anyone been able to create a workable solution of this type using .NET?
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Greg
I will recommend you to use the SBO_SP_TransactionNotification stored procedure, which is raised after any object is created, modified or deleted.
Here you have an example of how to use it.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/businessone/code-s... the sbo_sp_transactionnotification stored procedure.htm
Regards,
Ibai Peñ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
102 | |
8 | |
8 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.