function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ernesto GoycoecheaErnesto Goycoechea 

Data Modeling - Understand Custom & Standard Objects error or creating Property with currency data type

Hello,
Sorry to bother, I tried searching but could not find any questions regarding an error I am experiencing when trying to follow the steps for creating a custom object.

On the topic mentioned above (Understand Custom & Standard Objects) from the module Data Modeling there is a section in which you are required to create a custom field ("Price") to a custom object previously created ("Property").

I follow all the steps mentioned on the topic:

Create a Custom Field
The Property object we just created is pretty bare-bones. Let’s add some custom fields to it. Head back to your Trailhead Playground.
 1. From Setup, go to Object Manager | Property.
 2. In the sidebar, click Fields & Relationships. Notice that there are already some fields there. There’s a name field and some of the system fields we talked about earlier.
 3. Click New in the top right.
 4. For data type, select Currency.
 5. Click Next.
 6. Fill out the following:
    1. Field Label: Price
    2. Description: The listed sale price of the home.
 7. Check the Required box.
 8. Click Next, Next again, and then Save.
You’ll see your new Price field in the list of Property fields. In the Field Name column, notice that it says Price__c. The “__c” part is an easy way to tell that a particular field is a custom field.

The problem I am facing is with the currency data type it seems, because whenever I try to go and add a new property I am thrown the following error:

Error when trying to create a new Property

Technical stuff:
Uncaught afterRender threw an error in 'ui:inputSmartNumber' [Invalid regular expression: /[^a-zA-Z]k(?:\)|(\)?(?:\))?)?$/: Unterminated group]
throws at https://playful-moose-230944-dev-ed.lightning.force.com/auraFW/javascript/bZa2QajUSmHCPiEKj7zMjw/aura_prod.js:34:15. Caused by: afterRender threw an error in 'ui:inputSmartNumber' [Invalid regular expression: /[^a-zA-Z]k(?:\)|(\)?(?:\))?)?$/: Unterminated group]
eval()@https://playful-moose-230944-dev-ed.lightning.force.com/libraries/ui/inputNumberLibrary/number.js:3:382
Object.unFormatNumber()@https://playful-moose-230944-dev-ed.lightning.force.com/libraries/ui/inputNumberLibrary/number.js:3:350
Object.convertInputValueToInternalValue()@https://playful-moose-230944-dev-ed.lightning.force.com/components/ui/inputSmartNumber.js:9:401
Object.hasChangedValue()@https://playful-moose-230944-dev-ed.lightning.force.com/components/ui/inputSmartNumber.js:11:216
afterRender()@https://playful-moose-230944-dev-ed.lightning.force.com/components/ui/inputSmartNumber.js:12:408

I am quite certain that this is being caused by the currency data type because I tried removing it and adding a simple check box just to test it out and that works fine. See below:

Correct Property

Has anyone else come across this issue? And how did you end up solving it? I am on Lightning Experience

Thank you very much in advance.
Abhishek VONTELA 11Abhishek VONTELA 11
Price with currency Data Type works fine for me
This works fine for me try deleting the field and re create it sometimes it does work 
Ernesto GoycoecheaErnesto Goycoechea
Hello Abhishek,

Thank you for your answer, however as I mentioned, I am able to create the field with no issue. The problem occurs when I try to create a new object that contains that field. Also, I am using the Lightning Experience because the module was written for that.

Thanks.
Manuel Bustos 9Manuel Bustos 9
i'm facing the same problem, did you got it solved? 
Ernesto GoycoecheaErnesto Goycoechea
Hi Manuel, unfortunately no, I think I found your thread as well a few days ago and been following it just in case someone responds. This is kind of dissapointing to be honest, it's been days since this and I cannot do any challenges that include some number or currency fields...
Manuel Bustos 9Manuel Bustos 9
Hi Ernesto, in the meantime you can get a new developer account, and do the challenges in there, it works, but its dessapointing not being able to contact support!regards
Ernesto GoycoecheaErnesto Goycoechea
Thank you for the information, I'll try to do that then. Regards.
Ernesto GoycoecheaErnesto Goycoechea
If anyone is following this... it seems that this is solved, I did not do anything, just tried it and it seems that a fix was implemented that resolved this particular issue.
Manuel Bustos 9Manuel Bustos 9
Hi Ernesto, same happend to me, one day I loged in and tried and it worked, i did not do anything.