You need to sign in to do that
Don't have an account?
Ernesto 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:
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:
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.
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:
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:
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.
This works fine for me try deleting the field and re create it sometimes it does work
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.