Hi there - I'm trying to default a text for a field. Scenario is that I have a button that is opening a popup to enter notes. I want to default the comments, subject, etc. I have 4 "notes" buttons, but each of the 4 buttons will have different default text. So, button 1 subject says button 1, button 2 subject says button 2, and so forth. I'm trying to not have to create 4 different models with all the same functionality with exception of the default text. Does anyone have away around this without any JavaScript?
Ryan Faust
Skuidward Tentacles (Raymond), Champion
Chandra V, Champion
newComment = commentLine1 + '/n' + commentLine2;
and the /n produced a carriage return.
So you could run a snippet before showing your pop up that added the break, something like this: (replace CommentModel and Comments__c with your actual model and field)
var params = arguments[0],$ = skuid.$;
var myModel = skuid.model.getModel('CommentModel');
var myRow = myModel.getFirstRow();
var commentLine1 = "First Line of Comments";
var commentLine2 = "Second Line of Comments";
myComments = commentLine1 + '\n' + commentLine2;
myModel.updateRow(myRow,{Comments__c: myComments});