Remove the options from the Virtual drop downlist

 /**

     * Remove Options from virtual field

     * @param storeNumberVirtualField

     */

    function removeOptions(fieldToBeRemoved){

        try{

            let options = fieldToBeRemoved.getSelectOptions();

            for (let optionKey in options){

                if(options[optionKey].value !== 'NONE')

                    storeNumberVirtualField.removeSelectOption({

                        value: options[optionKey].value

                    })

            }

        }catch(error){

            log.error("Error @removeOptions", error);

        }

    }

Leave a comment

Your email address will not be published. Required fields are marked *