I've created a computed column and I want to create a new method using those computed column in dynamics AX 2012
It is not different from any other fields, so you refer it by View.Field
thanks for the help but it gives me an error when I write this method(public static server str GrossTons()
Of course it gives you an error if you're trying to call returnField() with just a single parameter (it requires three) and you're trying to call tableStr() with something that clearly isn't a valid table name.
i'm sorry it is not working I tried everything and it is not working even this code
public static server str GrossTons()
// declaration for the computed column// real MBTons,CulletTons;
it gives me this error: arguments is incompatible with the required type
All I want to do to have a new computed column called GrossTons by adding two computed columns which are MBTons and CulletTons
Position your cursor in front of the opening brace character (
Press Control+Shift+Space key combination, which will tell you what is the parameter that is required as an input. Then compare what you have passed in, and you should realize what you are passing in is incorrect, that is why you get the compiler error. Martin already told you this.
You can also refer to the documentation:
It says the required input are SQL Expression strings, and you obviously have not sent that in for the method. Use Google search or Bing to find examples, it would give you a ton of results from fellow community members, like this one: