Is there something similar to the famous toString()
method of C# in Axapta?
I try to run underlying code:
info(this.dataSource());
But it gives me this error message: "Argument 'txt' is incompatible with the required type."
Is there something similar to the famous toString()
method of C# in Axapta?
I try to run underlying code:
info(this.dataSource());
But it gives me this error message: "Argument 'txt' is incompatible with the required type."
The toString
is available on all objects but usually not of much value:
info(this.dataSource().toString())
This gives this output:
Class FormDataSource Address
Probably you knew that already! However the query datasource does give something useful:
FormDataSource fds = this.dataSource();
;
info(fds.query().dataSourceTable(tableNum(Address)).toString());
gives the corresponding SQL query:
SELECT FIRSTFAST * FROM Address
If you are only looking for the name of the dataSource you can do the following:
info(this.dataSource().name());
Unfortunately not, but there are a number of "...2Str()" methods for converting base data types to string, for example;
int2Str()
http://technet.microsoft.com/en-us/library/aa851371(v=ax.50).aspx
int642str()
http://technet.microsoft.com/en-us/library/aa851371(v=ax.50).aspx
date2str()
http://msdn.microsoft.com/en-us/library/aa857241(v=ax.10).aspx
Plus others.