Monday, June 7, 2010

InventSum - www.ms-news.net

while working on a way to reverse a transfer between warehouses in Dynamics AX 4.0, i came across this little piece of information on how invent um is updated. InventSum - www.ms-news.net. As expected, invent sum is not updated directly in code, but rather a table called inventsumdelta. the changes are committed once one reaches the top tts level.

"
In version 4, the mechanism to update InventSum has been changed.

The purpose is to prevent locking on the InventSum table.

2 new tables have been added for this purpose:
-InventSumDelta and
-InventSumDeltaDim

All changes to InventSum in a transaction are no longer applied directly to
InventSum but recorded in InventSumDelta first.

When the TTS level reaches 1, the method
InventUpdateOnhand\ttsNotifyPreCommit (triggered from
Application\ttsNotifyPreCommit) is called. This method carries out the actual
update(s) in InventSum.

One of the methods called by InventUpdateOnhand\ttsNotifyPreCommit is
updateInventSum. If only 1 InventSum record has to be updated within the
transaction, this method takes the standard way (via the method
updateInventSumSimple) using InventSum.write()

But if more than 1 inventSum record has to be updated within the transaction
(for example if you change the value in the warehouse dimension, the
InventSum record with the old warehouse has to be decreased and the InventSum
record with the new warehouse has to be increased), updateInventSum takes an
alternative route via updateInventSumAdvanced which completly ignores
InventSum.write() and uses direct SQL.

If your code does not actually need to update the InventSum records and only
needs to be informed of the event that InventSum has changed, i would
recommand calling your code from the InventUpdateOnhand\ttsNotifyPreCommit
method. Insert your call after the this.UpdateInventSum() and before the
this.deleteInventSumDelta() methods. The InventSumDelta table will give you a
reference to all the InventSum records that have changed.


Thursday, June 3, 2010

My first Iphone App

Hello World!!!

So, here it is. i followed this nifty guide to complete this intro application.
Not too shabby... though, the syntax feels a bit wierd. i guess my C is a bit rusty

Wednesday, June 2, 2010

whats with the single mouse button?

so, Macs have this really annoying "feature". they only have a single mouse button. whats up with that i thought! these pretentious bastards are so hot on design that they sacrifice function over form.  sure my track pad looks nice being a HUGE single button, but if i have to do "control" + click every time i want to right-click on something, then this will be a major PITA! Then, my boss pointed out that in fact, the track pad has multituch capability? My instant reaction? i laughed very hard, what the hell would i need multituch capability in a track .... wait a minute, OMG, OMG, OMG!!!!
i never want to go back to two button mice again, screw that!

on a different, but related rant, i was LOLing very hard the other day when i realized that the macbook only has one delete key. actually it's a backspace key, named delete, so i tried very hard to forward delete something only to realize i was going backwards ... Major WTF! Oh and dont get me started on command + c/v