Question: I have recently upgraded to vtiger 7.0.1 . In the previous version, I have a function for the summary view page which sets a different option in a picklist under certain condition. Thew new version arranges almost everything differently. val() property did not help me get picklist value, had to use text().trim() - `jQuery('#detailView > div.left-block > div > div.summaryViewFields > div > table > tbody > tr:nth-child(2) > td.fieldValue > div > span.value.textOverflowEllipsis').text().trim()`

the new summary page also changed the quick edit option, so my function in the older version is not working. `jQuery('#detailView > div.left-block > div > div.summaryViewFields > div > table > tbody > tr:nth-child(2) > td.fieldValue > div > span.value.textOverflowEllipsis > span option[value=Student]').prop('selected', true).trigger('list:updated');`

Can anyone help me with a way to change the picklist selection by jquery/javascript?

Answer: 
Its simple. 
First get the instance of Field.

> 
> var targetPickList = jQuery('[name="' + fieldname + '"]', container);
> 
> 
> 

Now Set the value of Picklist Field and Trigger Update method to set the Picklist value

> 
> var targetPickListSelectedValue = 'Value'; targetPickList.val(targetPickListSelectedValue).trigger("liszt:updated");
> 
> 
>
So this worked for us 

$('[name=FIELDNAME]').val('NEW VALUE').trigger('change');