This topic contains 1 reply, has 0 voices, and was last updated by JacksonP 7 years, 11 months ago.
-
AuthorPosts
-
November 28, 2016 at 8:37 am #1480
JacksonPHas anyone tried to update a field’s display type in a beforeLoad user event script? To give the full picture of what im trying to do… I’ve created a sublist on an event form to display search results based off of the customer. I’ve got everything working correctly except for inline editing on the sublist. The documentation gives me this example to update the display type of the field…
Code:
var form = serverWidget.createForm({
title : ‘Simple Form’
});
var field = form.addField({
id : ‘textfield’,
type : serverWidget.FieldType.TEXT,
label : ‘Text’
});
field.updateDisplayType({
displayType = serverWidget.FieldDisplayType.HIDDEN // Yes the ‘=’ is in the documentation
});
You should know that in a user event it doesn’t allow you to load in the serverWidget module. So this is how I’ve added the sublist to the form.Code:
var form = scriptContext.form;var sublist = form.addSublist({
id: ‘custpage_eventsublist’,
type: ‘list’,
label: ‘Touchpoint Customers Events’,
tab: ‘messagetab’
});var title = sublist.addField({
id: ‘title_’,
type: ‘text’,
label: ‘Title’
});
I feel like I’m missing something really simple to change the display type or maybe sublist have a different way to change the display type for a field.i’ve tried various ways like these
Code:
title.updateDisplayType({
displayType; ‘inline’
});title.displayType = ‘inline’
On a side note, is it possible to add a sublist to a field group?
This is a cached copy. Click here to see the original post. -
November 28, 2016 at 10:05 am #1481
JacksonPI found it, just changed the type for the sublist from list to ”inlineeditor’
-
AuthorPosts
You must be logged in to reply to this topic.