drop-down not updating on filed change -urgent help required

Page: Purchase order
Action Required:  Add a drop-down and update on filed change on line label

(1) Using userEvent script drop down is added on line label “before load” ( script 1.0 )

var fld_Project_task=obj_Sublist_Item.addField(‘custpage_project_task_list’, ‘select’, ‘Task List Based on Project’,”);
fld_Project_task.addSelectOption(‘0’, ‘<Tab The Project To Select The Task>’);
fld_Project_task.setMandatory(false);(2) Now , on line label whenever we change the project list (drop-down), then drop-down will be updated based on selected project  ( client script-2.1 )
//–Clear the old value in “TASK list” drop-down

let taskListObj=current_record.getSublistField({sublistId:sublistName,fieldId:’custpage_project_task_list’,line:line_number});
taskListObj.removeSelectOption({ value: null }); //clears all options
taskListObj.insertSelectOption({ value:”, text:”, isSelected:false});
//–Add the new dropdown liat
taskListObj.insertSelectOption({
  value:result.getValue(“internalid”),//task internal id
  text:result.getValue(“id”)+”_”+result.getValue(“title”), //Task id_task name
   isSelected:false
});

(3)  Issues : The above code is working only when we  click the “OK” button then re-select the project and it will update the “Task List” drop-down.

 

kindly help me how i can achieve this process only on filed-change event , not after the clicking “OK or ADD” button on line label
Rookie Asked on October 10, 2023 in Purchasing.

You are updating the the dropdown selection on a sublist. “OK” or “ADD” is the current behavior that the sublist accepts and I don’t think there is other option.

on October 10, 2023.

Ohh,
Thanks for your comment,
let me know if this possible fieldChange. Also if required full code.

on October 11, 2023.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor