Hi everyone , i change the type of the county field frim text to option but when i tried to add a new customer this error appeared
*This post is locked for comments
Hi everyone , i change the type of the county field frim text to option but when i tried to add a new customer this error appeared
*This post is locked for comments
This error usually comes when the data type use to be changed so at that time you have to close the database and start again.
OR
This error is coming because the data type has changed from Text to option.
If you want to see where exactly the error is coming just debug it (Tools-Debugger-Active)
Now when you try to add a new customer the debugger will start and will show you the break point on the error line.
There you check that the data type of the global variable or the local variable you took with the County field in the customer table are same or not.
Both the data types should be same.
After modification close your database and start it again and this error will go off.
Hope this will help..
If you managed to resolve your issue, please mark all helpful answers as Verified - this would indicate to similar forum members that your issue has been solved.
I suppose, you had already some data in the County field when it has been Text type, and now you are trying to convert it to fixed options which might not correspond to the text it contained.
I fully agree with Suarav that it will be much more difficult and even dangerous to data integrity to change the types of the fields without serious reason. If you need an option field, it is much easier just to add a new field to the table and make it an option type, then remove the standard County field from the page and insert a new field.
Hi,
The First Question is - Why you want to change a standard field data type?
If you still plan to change it you need to identify where all that field is used. Third party tools like Prism should be used to find the relation of tables / fields in whole system.
The issue that you are facing is due to standard function ValidateCity call that is being called and need a parameter Country Code.
I think you need to analyze that a New Custom Field for Country Options seems a good idea.
Hi,
When the error pops up, close the error window and the system will take you to the line where the error occurred. So do the change as I mentioned on my previous answer. Recompile the object again.
Hope it helps.
where can i add this ?
Hey Kamilia,
Restart your NAV service from Services.MSC. It will then work for sure.
Hi,
You are trying to concatenate text and an option.
If you want to add Text and Option and return a Text value, use FORMAT() for your option like following,
TextResult := Text + FORMAT(Option);
Hope it helps.
i am getting this error
Hi,
It seems like you have not recompiled the objects.
Please recompile the object(s) that you have made the change(s).
Hope it helps.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156