End of mainstream support for Microsoft Dynamics AX 2009, 2012, and 2012Mainstream support for Dynamics AX 2009 Service Pack 1 (SP1), Dynamics AX 2012, and Dynamics AX 2012 R2 ended Oct. 9, 2018. After that date, only security hotfixes will be provided for these three versions through the extended support period that until Oct. 12, 2021. Read more
Dynamics 365 2019 release wave 2 plan Discover the latest updates to Dynamics 365.Release Plan | Weekly Deployment Notes
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants.Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements.
ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Talent TechTalks
Actually , In starting we developed a table which have one string field for putting values example "100 & 200". But some users entered value like" space 100 & space 200". so that's create problem for getting report through Power BI.
So my question is, Their any possibility to change string field to real filed on user interface form level. So user can only enter real value.
If you want them to enter "100" you need to change field type to real or int on the table. If you want to let them enter "100 & 200" then you need to implement validation on the field and check that string formatted as you like.
The best way is to change the table field from string to real or int. Ax will handle all the validations for you. If you can't make changes to the table then override the validate method of that field in the form and only allow proper real numbers.
if the problem is only left-right 'space' override the modified method and use strLtrim and strRtrim to get rid of right and left space.
Thanks ievgen, I appreciate your quick response, Can you please explain little bit more how can I change the field on table because on field properties type is not editable. And in this field used EDT which is also string.
You can't change the primitive data type of an existing field. You need to create a new field with a new type. Then change your application code to use the new field. You need also to create a runnable class that will migrate data from your old field to the new field.
Now you can deploy those changes to test and prod, and run the migration class. In the next deployment you can remove the old field.
Do not simply delete your old field and add a new one with the same name, because this would fail in database sync, preventing you from deploying it to test / prod.
But the correct solution really depends on your full requirement which we don't know. If only numbers should be allowed, use real or int type. If you need to allow alphanumeric characters, use string.
You can also link your string field to another table where all allowed values can be defined. Examples of such pattern in standard system include customer group, item group, zip code etc.
thanks, for you response Nikolaos, I need that field act like a real value this field used for enter quantity value only because sometimes user give space in before enter the the quantity it create problem.
Then add validation to check that only numbers are entered, you can use str2NumOk() function to check that. However, I would recommend to change field type instead.
You can't do calculations based on string fields, so you should definetely use a numeric data type.
If you are changing field type str to real or int then you have to change in Form control, Reports also. Also in code if you are used.
Better create new field and update data in table.
Business Applications communities