- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022 05:20 AM
Hello, I want to know how to copy value from one field to another. It should be automatic for every other entry.
"customer_contact" table, it should copy value from field “email” to “user_name”.
I tried to create BR, but it did not work.
Any suggestions?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022 05:24 AM
In business, rules use actions to set the value. (If both are of the same type) as email and user id fields are the different types we need set from the script :
When to run: before (insert,update)
current.user_id = current.email.toString();
Mark correct and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022 05:24 AM
In business, rules use actions to set the value. (If both are of the same type) as email and user id fields are the different types we need set from the script :
When to run: before (insert,update)
current.user_id = current.email.toString();
Mark correct and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022 05:26 AM
I already try that, but if I try to set actions User ID> same as> email. But email is missing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022 06:13 AM
It's because the email field type and user id field type are different. You need to use the script mentioned above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022 11:52 PM
I tried this script but it does not work. I set parameters as you wrote down.
