Populate text field based on selected option from a DCF

Hello
I am trying to populate the email field based on the selected contact person option from the Dynamic Choice Field on the Sale Order form.
I am writing code in "Trigger After Update" of the DCF (code is as below), but the alert shows blank although contactPerson shows the correct value in the alert.
How can I populate the email address and mobile fields based on the selected value in DCF ?
2 replies
-
I suspect you are seeing a blank alert() is because when you do a select Ninox with no fieldname, Ninox always returns what appears to be blank but isn't. Ninox just doesn't know what to show you.
If you change the code to:
then you should see nid(some data).
When working with dynamic fields the one function that comes in handy is record(), well and number() or numbers(). Since you have already selected the record you want in the dynamic field, no need to do a select just use record() and number() to get the record.
If that all works you can modify it to set the fields you want to the data you want.
Content aside
- Status Answered
- 7 mths agoTue, September 3, 2024 at 9:48 AM UTCLast active
- 2Replies
- 50Views
-
2
Following