Ok All,
I have tested the following and it works great.
Records get's updated every time, and the Method called to replicate the Data is
in a Class that is ran from the AOS server. Little overhead, and very
fast.
SalesLine.ValidateWrite
''
.ValidateDelete
'' .insert
Only added two lines of code to each method, and the thing
works like a champ. I understand the trigger 'motive' and I also understand the
other way that was explained. This way though seems to work the best, because I
want the Web database updated as the SalesLine is. If a line is deleted, then
the line is Deleted from the Web. Updated, updated on the web. Added, added to
the web. etc. etc.
The great thing about this way is, this becomes a
Transaction type of replication. Only a small amount of data is replicated at
one time. This also means that the Web database will be as up to date as
Axapta!
Let me say to that I respect everyone's concerns as well,
and appreciate your advice on the matter. After this is fully implemented it may
come back to a trigger, but for now it seems the way I have chosen, with the
above mentioned SalesLine methods, works great, quickly, and One VERY important
aspect: It's transactional based (meaning not a batch / bulk type of
Replication.)
thanks,
Brandon
From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Harry (Harshawardhan Deshpande
Sent: Thursday, June 30, 2005 7:55 PM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Sales Order - Question
hi
ValidateWrite may not be the correct way to go for since this
method will be called only if the update is being called from the form.
This is why a lot tables have validations written on the update method.
regards
harry
Brandon George <[EMAIL PROTECTED]> wrote:
Brandon George <[EMAIL PROTECTED]> wrote:
Well this is great conversation! Thanks for your input, and I believe that I found the Solution:Override the ValidateWrite and ValidateDelete methods. Adding code that would transfer the information from the SalesLine to our Web Database at this point seems to work every time.@ harry:Did you consider ValidateWrite / ValidateDelete methods? After doing some research it seems that these methods are called every time no matter what, when it comes time to actually write a Line in ANY table for that matter.-Brandon
From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Harry (Harshawardhan Deshpande
Sent: Thursday, June 30, 2005 5:35 PM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Sales Order - Questionhi Brandonthis email is just for the sakes of complete discussion.it is not necessary tha the update and insert methods on a table will be executed. The logic may go for doInsert and doUpdate. though I cant think of a scenario where doInsert/Update methods are called for sales table it may be worthwhile to check this out especially the modifications developed by your programmers (I have seen a lot of times that programmers will uncessarily call the doInsert/update methods).Another problem that you are going to face is ttsabort. If a transaction is inserted into the database and later aborted then there is no easy way to get hold of this abort statement. You can avoid this problem to a great extent by putting your code after the ttscommit statement (if any) in the insert/update methodI have not checked all the code but one place where you will be completely lost will be if a piece of code is creating a sales order and there is a tts loop at the higher level. For e.g. may be creation of inter-company orders etc. Or may be auto creation of sales lines.I would give a serious thought to writing triggers in sql server. I am aware that sql server is a black box for Axapta and believe me I personally hate doing such triggers but in your case it may be the correct way to go.regardsharry-----Original Message-----
From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED]On Behalf Of Brandon George
Sent: Thursday, 30 June 2005 8:39 AM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: [Axapta-Knowledge-Village] Sales Order - QuestionHello all,Ok let me give you some information, that will hopefully help explain what I am trying to do. You see we have a Web Site and Database structure for that website in place. We are currently implementing Axapta, and in order not to change to much at once, we are wanting to replicate data from Axapta to our Web site database.In order to do this, I am wanting to run a piece of code every time a Sales Order is created that would replicate that Sales Order to our web site database.Does anyone have a clue as to the best way to do this? Is there a class that is always called when a new Sales Order is created? I figure SalesAutoCreate, but I am not so sure.Anyway thanks in advance! And please let me know if you don't understand that question and I can give more details!thanks,Brandon
Sharing the knowledge on Axapta.
---- LSpots keywords ?>---- HM ADS ?>
Sharing the knowledge on Axapta.
---- LSpots keywords ?>---- HM ADS ?>
Sharing the knowledge on Axapta.
---- LSpots keywords ?>---- HM ADS ?>__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Sharing the knowledge on Axapta.
---- LSpots keywords ?>---- HM ADS ?>
Sharing the knowledge on Axapta.
---- LSpots keywords ?>---- HM ADS ?>
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
Sharing the knowledge on Axapta.
---- LSpots keywords ?>---- HM ADS ?>
Sharing the knowledge on Axapta.
---- LSpots keywords ?> ---- HM ADS ?>
YAHOO! GROUPS LINKS
- Visit your group "Axapta-Knowledge-Village" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.