I didn't understand u're problem in the least :) but here is a code snippet that
is the first line of the modeling tree getting a warehouse value from the Salesline.
Warehouse=InventDim::find(SalesLine::findInventTransID(InventTransID).InventDimID).InventLocationID;
I personally try to use the tree and not use the rules for flexibility.
Kevin
Dionne <[EMAIL PROTECTED]> wrote:
What I am looking to do is to use the current Salesline record in
the code snippet to do a find to return the value of a field to do a
logical comparison so basically from a post validation code editior
I would like to be able to do a basic find
Custtable = Custtable::find(Salesline.CustAccount)
and then if then
if(Custtable.BMI_EuropeanSales)
BB_EuroCustomer = 1;
else
BB_EuroCustomer = 0;
return BB_EuroCustomer;
I have gotten to the point where at the time the code is executed
XppCompiler.execute(varMap), all scope of the Salesline variable is
lost so I can't use the current record because the execution of the
code has began. You can't pass the Salesline record to the execute
method of course, varMap is using the parameter, so its like to me
its kind of impossible. I don't want to do this in the Modeling
Tree, its to late by the time this code is executed. The class that
I am have been working with are PBARuleClass, PBARuleExpression,
PBAVarMap, PBAValidation. At the time variable validations are
executed these classes start executing
Classes\PBAVarMap\get - line 6 - first line of code block begins
<runtime compiled code>\ruleexpr - all Salesline record is lost
\Classes\XppCompiler\execute - at this point execution of code block
begins \Classes\PBARuleClass\validate - line 9
\Classes\PBAValidation\validate - line 18
\Classes\PBAValidation\setValue - line 43
\Forms\PBAFrontEndForm_PB1_0001_tst_enus\Methods\setVal - line 4
\Data Dictionary\Tables\PBATmpBuildForm\Methods\validateField - line
17 \Classes\FormDataObject\validate
\Classes\FormRealControl\modified \Classes\FormRealControl\leave
\Classes\FormRun\selectControl
So I am kind of stuck at this point I have no idea how to grab the
current Salesline record. I have been told to use a global variable
but looking at the code for constructing a global variable has been
quite confusing
SPONSORED LINKS
Computer part Programming languages Microsoft axapta Support exchange
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "development-axapta" 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.
---------------------------------
---------------------------------
Brings words and photos together (easily) with
PhotoMail - it's free and works with Yahoo! Mail.
[Non-text portions of this message have been removed]
SPONSORED LINKS
| Computer part | Programming languages | Microsoft axapta |
| Support exchange |
YAHOO! GROUPS LINKS
- Visit your group "development-axapta" 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.

