First create a fieldgroup on the table which is shown in the Grid.

Then create a validateField() method on the table you want to be editable.

Now in that method, determine whether the value exists in the related table
(create an exist method in your tableTwo that returns a Boolean) and let
Axapta do the rest. You could use fieldNum(tableOne, fieldX) function to
check which field you want to be validated.



/b



  _____ 

Van: nabilwilson [mailto:[EMAIL PROTECTED]
Verzonden: vrijdag 4 maart 2005 18:28
Aan: [email protected]
Onderwerp: [development-axapta] validate / modifed ?





Hello all,

This is a really simple problem, but somehow I
just could not make it. Here's an example:

I have two tables (e.g. "TableOne" and "TableTwo"), which both have
one textfield (let's call it  "fieldX").

Then I have a grid in a form, where I have one column which data
comes from TableOne.fieldX.

I want to prevent that user can not _modify_ existing value in
TableOne.fieldX, IF the value exists in TableTwo.fieldX.

I think there's two ways to do it. First use a somekind of relation
in tables. Second, to put some simple code to this column in a grid,
e.g. into modified- or validate- methods.

With the code solution, I have this problem. How to get
the old value (the one that user modified)?

this.valueStr() gives me the new just typed value.











Yahoo! Groups Sponsor



ADVERTISEMENT

<http://us.ard.yahoo.com/SIG=129bugdjo/M=298184.6018725.7038619.3001176/D=gr
oups/S=1705006764:HM/EXP=1110194139/A=2593423/R=0/SIG=11el9gslf/*http:/www.n
etflix.com/Default?mqso=60190075> click here



<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=
:HM/A=2593423/rand=671506921>



  _____ 

Yahoo! Groups Links

*      To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
 
*      To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
 
*      Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/>  Terms of Service.



[Non-text portions of this message have been removed]





Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to