how to restrict string field allow only alphabets in axapta.

hi, i am new to axapta. how to restrict string field allow only alphabets in axapta.

i have a table:Table1

in that i have a string field:Name(str).This field allow only alphabets.how can i restrict.

plz help me

thx in adv

Override the validateField method in that table

#define.alphabets(‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’)

str k;//is your field

;

write a case for your field.

k = “efrt67”;

if((strkeep(substr(k, 1, strlen(k)), #alphabets) != substr(k, 1, strlen(k))))

ret = checkFailed(“You cannot enter other than alphabets”);

BALA

If you want to restrict in form use the following code.If you wannt to do in table do in validate field.

public void textChange()
{
super();
this.text(strkeep(this.text(), “ABCDEFGHIJKLMNOPQRSTUVWXYZ”));

}