razer456
08/02/2021, 4:56 PMvar record = currentRecord.get();
and i have a sublist created
var sublist = form.addSublist({
id:'custpage_selectsalesorder' ,
label: 'Select SO to print',
type: serverWidget.SublistType.LIST
})
then on 'BUTTON' click i run a saved search and i just want the results in the sublist...
how do i go into it?
how do i set the value of sublist .... its SUBLIST TYPE IS LIST
record.setCurrentSublistValue({
sublistId: 'custpage_selectsalesorder',
fieldId: 'date',
value: expectedshipdate,
});
OR
record.setSublistValue({
sublistId: 'custpage_selectsalesorder',
fieldId: 'date',
line: i,
value: expectedshipdate,
});
battk
08/02/2021, 4:59 PMrazer456
08/02/2021, 5:19 PMbattk
08/02/2021, 5:20 PMrazer456
08/02/2021, 5:38 PMbattk
08/02/2021, 5:45 PMrazer456
08/02/2021, 6:18 PMrazer456
08/02/2021, 6:18 PMrazer456
08/02/2021, 6:19 PMrazer456
08/02/2021, 6:19 PMalien4u
08/02/2021, 8:49 PMbattk
08/02/2021, 11:52 PMrazer456
08/03/2021, 7:11 AMsubmit
and search
and i want to update the sublist on search
button click and then when i whether click the print on each line (that i have provided) ... i click the submit
button which creates the advanced PDF for which i am yet to write the full logic..for which i have to GET the value from the search first successfullyrazer456
08/03/2021, 7:15 AMserverWidget.SublistType.LIST
and if add an internalId field with the
internalId.updateDisplayType({displayType: serverWidget.FieldDisplayType.ENTRY});
record.selectNewLine("custpage_selectsalesorder");
record.setCurrentSublistValue(
"custpage_selectsalesorder",
"internalId",
internalid
);
record.commitLine("custpage_selectsalesorder");
this should work right?razer456
08/03/2021, 7:17 AMrazer456
08/03/2021, 7:19 AMbattk
08/03/2021, 7:54 AMrazer456
08/03/2021, 7:56 AMbattk
08/03/2021, 7:57 AMrazer456
08/03/2021, 8:57 AMrazer456
08/03/2021, 8:57 AMrazer456
08/03/2021, 8:58 AMbattk
08/03/2021, 9:10 AMbattk
08/03/2021, 9:10 AMrazer456
08/03/2021, 9:10 AMrazer456
08/03/2021, 9:11 AMrazer456
08/03/2021, 9:11 AMbattk
08/03/2021, 9:13 AMbattk
08/03/2021, 9:13 AMbattk
08/03/2021, 9:14 AMbattk
08/03/2021, 9:15 AMbattk
08/03/2021, 9:15 AMbattk
08/03/2021, 9:16 AMrazer456
08/03/2021, 9:17 AMrazer456
08/03/2021, 9:17 AMbattk
08/03/2021, 9:18 AMbattk
08/03/2021, 9:18 AMEric B
08/04/2021, 5:15 AMEric B
08/04/2021, 5:18 AMBibek Shrestha
08/04/2021, 4:47 PMINLINEEDITOR
and change the display type of all the fields which you don’t want to be edited to DISABLED
.
4. On the client script, when the button is clicked, perform the saved search and list them on the sublist using .selectNewLine
and .setCurrentSublistValue
.
I have done something similar with sublist type LIST
on POST require to the Suitelet. You repeat everything on the GET request along with addition of the sublist rows. I used .setSublistValue
for this. With this, you can also add inlinehtml to print pdfs or do whatever you want from each sublist row.