Dowen Robinson
05/06/2020, 3:33 PM// create account select input
var account = form.addField('custpage_acc', 'select', 'Account', 'customrecord_acc')
// should get populated with information relating to account selected
var additionalAccountInfo = form.addField('custpage_addinfo', 'text, 'Additional Info', <source>??)
I'm not really sure how I should source that info. Any ideas? The help would be much appreciated.Sean Murphy
05/06/2020, 3:38 PMDowen Robinson
05/06/2020, 3:40 PMSean Murphy
05/06/2020, 3:45 PMvar LeadSource = form.addField({
id: QIF.fields.leadSource.name,
type: ui.FieldType.SELECT,
label: QIF.fields.leadSource.label,
container: personGroup
});
Sean Murphy
05/06/2020, 3:47 PMSean Murphy
05/06/2020, 3:47 PMif (fldname == QIF.fields.campCat.name) {
var desField = rec.getField({
fieldId: QIF.fields.leadSource.name
});
// Remove the options.
var ops = desField.getSelectOptions();
var len = ops.length;
for (var o=0; o < len; o++){
if (ops[o].value > 0){
desField.removeSelectOption
({
value: ops[o].value
});
}
}
var category = rec.getValue(QIF.fields.campCat.name);
if (category > 0) {
var rmfcategorySearch = search.create({
type: search.Type.CAMPAIGN,
columns:['title'],
filters:[
['category',"IS",category],
"AND",
['custevent_department_default',"IS","DR"]
]});
var campaign = rmfcategorySearch.run().getRange({
start: 0,
end: 1000
});
for (var s = 0; s < campaign.length; s++){
if(campaign.length == '1'){
desField.insertSelectOption({
value:campaign[s].id,
text:campaign[s].getValue('title'),
isSelected:true
});
}
else{
desField.insertSelectOption({
value:campaign[s].id,
text:campaign[s].getValue('title')
});
}
}
}
}
Sean Murphy
05/06/2020, 3:48 PMSean Murphy
05/06/2020, 3:48 PMDowen Robinson
05/06/2020, 3:54 PMSean Murphy
05/06/2020, 4:30 PM