[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

PBA Price Combinations LOTID

SSCALET

12/22/2005 8:15:00 PM

In the product model I can add a code node and have access to the
InventTransId of the sales line by defining the system variable LOTID. But
when setting up price combinations for my model I can't grab that same
variable!

I've tried varMap.get('LOTID',1) but it doesn't recognize LotID as part of
my variable map even though it works in variable validation code.

Has anyone been able to access the inventtransID of the sales line being
configured while setting up price combinations??

Thanks in Advance!!!!!!

Sandy
2 Answers

cadem

12/22/2005 10:59:00 PM

0

Hi,

there is no std-solution without modifications!

Possible solution:
in classes\PBAValidation\setsalesprice(), line 30
salesprice is calculated.
When before this line, adding the inventtransId to the 'varmap', and after
this line, deleting the inserted inventtransId,
i am quite sure this variable will be accessible in price-calculation (use
code and not the variables.), and source code executed afterwards will not
be confused by this modification.
Let me know if it works..

camur



Op Thu, 22 Dec 2005 12:15:06 -0800 schreef SSCALET:

> In the product model I can add a code node and have access to the
> InventTransId of the sales line by defining the system variable LOTID. But
> when setting up price combinations for my model I can't grab that same
> variable!
>
> I've tried varMap.get('LOTID',1) but it doesn't recognize LotID as part of
> my variable map even though it works in variable validation code.
>
> Has anyone been able to access the inventtransID of the sales line being
> configured while setting up price combinations??
>
> Thanks in Advance!!!!!!
>
> Sandy

SSCALET

1/5/2006 6:26:00 PM

0

hi Camur,

I got around this by adding an actual variable to the product model called
LOTID_hidden. I do not display this variable in the map. In the class
PBABuildForm method fillDataSource in the switch statment for a string
variable I've added a case for my variable LOTID_hidden and assigned it the
inventtransId from the salesline. This way it is always in my varMap and
accessible all my price combinations code.

Sandy

"camur" wrote:

> Hi,
>
> there is no std-solution without modifications!
>
> Possible solution:
> in classes\PBAValidation\setsalesprice(), line 30
> salesprice is calculated.
> When before this line, adding the inventtransId to the 'varmap', and after
> this line, deleting the inserted inventtransId,
> i am quite sure this variable will be accessible in price-calculation (use
> code and not the variables.), and source code executed afterwards will not
> be confused by this modification.
> Let me know if it works..
>
> camur
>
>
>
> Op Thu, 22 Dec 2005 12:15:06 -0800 schreef SSCALET:
>
> > In the product model I can add a code node and have access to the
> > InventTransId of the sales line by defining the system variable LOTID. But
> > when setting up price combinations for my model I can't grab that same
> > variable!
> >
> > I've tried varMap.get('LOTID',1) but it doesn't recognize LotID as part of
> > my variable map even though it works in variable validation code.
> >
> > Has anyone been able to access the inventtransID of the sales line being
> > configured while setting up price combinations??
> >
> > Thanks in Advance!!!!!!
> >
> > Sandy
>