Adding AfterFieldChange event on UD table gives error on compile

(Pierre Hogue) #1


I have added UD13 table to my Sales order form via the wizard. I have attached Number03 field to a textbox. I wanted to add functionnality when user enters info in text box, it will set a today’s date in another text box, which is bound to Date01 field.

So via the wizard, I added a AfterFieldChange event to the UD table view so far so good.
Compiling after the addition does not give error.
Closing the form and reopening it will generate an error.

I recompile in design mode and now gets a compile error:(sorry it is in french…)

Error: CS1061 - line 252 (5158) - ‘Script’ ne contient pas une définition pour ‘UD13_Column’ et aucune méthode d’extension ‘UD13_Column’ acceptant un premier argument de type ‘Script’ n’a été trouvée (une directive using ou une référence d’assembly est-elle manquante ?)

for the following line In initializeCode generated and placed after the InitializeUD13…

this.UD13_Column.ColumnChanged += new DataColumnChangeEventHandler(this.UD13_AfterFieldChange);

What am I missing? or maybe it is not possible to ahve this functionality?

anyone else having this issue?
I am on 10.0.700.1

thanks Pierre

(Kamran Javid) #2

Are you using the event wizard from the customization toold dialoge? it doesnt look like it has been declared properly.

(Pierre Hogue) #3

Yes all done by wizard… if not declared properly…well it is a wizard issue !!!

so what I would need to change in order to make it work?


(Kamran Javid) #4

It may well be a wizard issue. I just tried it and the AfterFieldChange event is not even firing.

(Pierre Hogue) #5


Sounds like I will revert to detecting the actual textbox leave event then…!!



(Jose C Gomez) #6

The wizard assumes there is a UD13_Column in your customization (natively there is)
Simply find that line and replace it with


Insead of the UD13_Column

Go to that line that is erroring out and replace the UD13_Column with the above.

(Pierre Hogue) #7

Thanks Jose

You pointed me to the right direction… your suggestion did not work, giving me same errors…but the following did work:

this._ud13Adapter.UD13Data.UD13.ColumnChanged += new DataColumnChangeEventHandler(this.UD13_AfterFieldChange);

And the event fired as expected.

Thanks again

(Jose C Gomez) #8

That is exactly what I suggested… lol glad it works