I am trying to do a copy from or just do a new and programically fill in the data. Here is my code. However, it does not seem like my form go filled in with the new data?
This looks like it should work fine. setValue() is an appropriate API to set the value of an individual field within the form (It’s a very fundamental method and extremely unlikely to be broken).
Probably best to post a standalone test case demonstrating the problem.
Note: If you do want another approach, another option would be to pass a HashMap of initial values to form.editNewRecord()