I had the same issue and found this solution from someone's posting.

Why it needs to be server I can only guess is that reservation may have some
concurrency/version issues or requirements and so running on a central place
is required so that you don't end up with 2 users managing to reserve the
same stock (Although if you have clustered AOS maybe my argument falls
down...).

Alternative is that it is just for performance or even the original
programmer coded it without realizing

Not really sure to be honest but I believe this is the only way to get rid
of the error message so if it's the only way then I guess it has to be the
proper way ;)


-----Original Message-----
From: Axapta-Knowledge-Village@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of cugwilsont
Sent: 07 August 2007 10:38
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: [Axapta-Knowledge-Village] Re: Reserve a Salesline for a specify
inventdim by code

Thanks alot James, It's work after I have change it to run on server!
I would like to ask if this is a proper way to do in this way? I 
never try to touch inventmovement so I don't have much confident on 
it. Thanks in advance.

--- In Axapta-Knowledge-Village@yahoogroups.com, "James Flavell" 
<[EMAIL PROTECTED]> wrote:
>
> Make sure you code is setup to run on the server not on the client.
> Some part of the reservation code has to run on the server or you 
get this
> message
> 
> 
> -----Original Message-----
> From: Axapta-Knowledge-Village@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of 
cugwilsont
> Sent: 03 August 2007 13:11
> To: Axapta-Knowledge-Village@yahoogroups.com
> Subject: [Axapta-Knowledge-Village] Reserve a Salesline for a 
specify
> inventdim by code
> 
> Hi
> 
> I want to write a code to reserve a salesline for a specify 
> inventdim. 
> 
> Since my client provide a CSV file specific what serial ID he 
wants, 
> so I want to create a salestable/salesline by the information he 
> provided.
> There is my code
> salesline = salesline::find("1095328",1);
> inventmovement = InventMovement::construct(salesLine);
> inventDimCriteria = inventdim::find("788873");
> 
> inventDimParm.initPrimaryDimReservation(inventMovement.dimSearch
> (),inventMovement.dimGroupId(),inventDimCriteria);
> inventDimFixed = InventDimFixedClass::inventDimParm2InventDimFixed
> (inventDimParm);
> 
> inventMovement.inventdim(inventDimCriteria);
> inventUpd_Reservation = InventUpd_Reservation::newMovement
> (inventMovement,inventDimCriteria, inventDimParm, inventDimFixed, -
> 15);
> inventUpd_Reservation.parmAllowAutoReserveDim(false);
> inventUpd_Reservation.updateNow();
> 
> It seems to work since the inventTrans already changed to Reserved 
> physical.
> 
> But there is an info message 
> "The cursor is invalid for instantiating recordViewCache."
> 
> I wonder if my code has written in a proper way to do this. Any 
> comment?
> 
> 
> 
> 
> 
> Sharing the knowledge on Axapta.
> Visit www.frappr.com/axapta for axapta friends.
> 
> Come and choose your preferred name for Microsoft Dynamics AX on 
the Axapta
> Knowledge Village, Visit www.axapta-knowledge-village.tk
> 
>  
> Yahoo! Groups Links
>




Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends.

Come and choose your preferred name for Microsoft Dynamics AX on the Axapta
Knowledge Village, Visit www.axapta-knowledge-village.tk

 
Yahoo! Groups Links




Reply via email to