开发者

Axapta: Edit form field values

Using a 'clicked' override on a button, I'd like to modify values in an Axapta form.

I'm able to get data from the form field using:

str strOld = For开发者_JAVA百科m_FieldName.valueStr();

I'm able to prepend text to the field using:

Form_FieldName.pasteText(strNew);

I can't seem to find a .clear method or .value= method. I'd like to replace the entire value in the field with new information.

Thanks


If the field is bound to a datasource, you have to modify the value in the datasource. If the field is bound to a variable, then modify the value of the variable itself. It is the easy an smart way to do it.

You can modify the value in the form control by using the .text() method. (The control have to be the AutoDeclaration property set to Yes). This is a setter-getter (parameter) type method used in AX. If no parameter is passed, it is user as getter (read). If you pass a value, this is a setter (write).

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜