Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

start your activity again

Posted on by Microsoft Employee

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 appearedsta.png

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: start your activity again

    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.

  • Suggested answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: start your activity again

    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.

  • Suggested answer
    Saurav.Dhyani Profile Picture
    Saurav.Dhyani 17,965 Super User 2024 Season 2 on at
    RE: start your activity again

    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.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: start your activity again

    st2.png

  • Suggested answer
    RE: start your activity again

    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.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: start your activity again

    where can i add this ?

  • Suggested answer
    RockwithNav Profile Picture
    RockwithNav 6,562 on at
    RE: start your activity again

    Hey Kamilia,

    Restart your NAV service from Services.MSC. It will then work for sure.

  • Suggested answer
    RE: start your activity again

    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.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: start your activity again

    7446.sta.png i am getting this error

  • Suggested answer
    RE: start your activity again

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans