Hi,
I have a multi-line text field. I am trying to retrieve the values from the multiline rich text field using the javascript client object model.
My current code is:
var context = new SP.ClientContext.get_current();
var web = context.get_web();
var oList = web.get_lists().getByTitle(itgConfigTitle);
var camlQuery = new SP.CamlQuery();
var q = 'caml query';
camlQuery.set_viewXml(q);
this.collListItem = oList.getItems(camlQuery);
var itemFieldValues = collListItem.FieldValuesAsText;
context.load(itemFieldValues, 'Include(Title,TestValue,TestDetails)');
//TestDetails is a multiline field
context.executeQueryAsync(Function.createDelegate(this, this.Configsuccess), Function.createDelegate(this, this.failed));
function Configsuccess(sender, args) {
var enumerator = this.itemFieldValues.getEnumerator();
while (enumerator.moveNext()) {
var currentItem = enumerator.get_current();
}
}I have used the "FieldValuesAsText", but is this the correct way.
How to avoid the div tags and get the data alone from multiline field in javascript client object model?
Thanks