MobileCRM.UI._DetailView.filterStringListOptions - Resconet/JSBridge GitHub Wiki

[v18.1] Filters allowed StringList options in MobileCRM.UI.DetailViewItems.LinkItem.

Arguments

Argument Type Description
index Number Item index on the view.
allowedOptions string[] An array with options to be allowed (e.g. ["New", "Completed"]).
defaultValue String New data source default value. If not defined, the first item from allowedOptions will be used. Ignored, if value isn't in allowedOptions.

This example demonstrates how to change a set of allowed options in StringList field implemented as LinkItem.

function updateCustomComboboxSource(name) {
	MobileCRM.UI.EntityForm.requestObject(entityForm => {
		const detailView = entityForm.getDetailView("General");
		const index = detailView.getItemIndex("status");
		detailView.filterStringListOptions(index, ["New", "Canceled", "Closed"], "New");
	});
}
⚠️ **GitHub.com Fallback** ⚠️