hi
I have an Option field in few table to which I would like to insert another "Option". Eg:
Field: CreditCardType
Options: Master, Visa, American Express
Tables have records closer to a million. I need to insert another option like this:
Field: CreditCardType
Options: Master,JCB, Visa, American Express
Is there any easy way of inserting this? If just modify field, all previous "Visa" value will be displayed as "JCB".
TIA
"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."
0
Answers
If that is not possible, then you have export all objects that reference the field as text, make the change and load all the text objects.
Then write a routine to increment the option field if it's greater than 0 for all the records.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I decide to change it anyway and your solution of increasing the value by 1 for items >0 seem to be an excellent one for me.
But, is it an absolute necessary to export/import objects as text? Or, an easuy way recommended to Search/Replace the text?
I know the tables very well and can't I just go and change the table definition directly in Object Designer?
Regards
Maluwa
Otherwise all the code that refers to visa will now refer to JCB.
If you want to make sure that it's ok to not do the change. Export the modified object as text and search for Creditcardtype.
If you don't find it being used anywhere, are safe.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I understood the purpose of export/import in this case.
Really appreciate your timely response
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
The correct solution is to change the option to:
Field: CreditCardType
Options: Master, Visa, American Express,JCB
You should never add an option in the middle of an existing string in a live system.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Yes I know you gave the right suggestion, its just a pity he didn't listen to you. At least you have helped him to minimize the damage, but wouldn't it be so much nicer if people just listen.
In one argument, I even told the client that they can find another developer to do it, but most of the time you don't get that luxury.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
yes I know the feeling. And you are right, there is no point trying to convince someone on the forums to do things properly, when clearly they have already decided to go the wrong way, and are really just after a justification.
No wonder some Navision projects go South.