AnsweredAssumed Answered

How can I set a field value dynamically on create view?

Question asked by Roee Roee on Jun 30, 2014
Latest reply on Oct 12, 2016 by Nikhil Jambhawadekar
When I extend the record view via record.js, I can set the model's fields via:
SUGAR.App.controller.context.attributes.model.set('name', 'ModelName');
However this does not work on the create view, I've extended the create.js and that line of code does not affect the model's fields.
Is the model saved in a different location in the create view?
Also how can we reduce duplicate code that is used when extending both record.js & create.js?
Thanks in advance for anyone that helps.

Outcomes