book
Article ID: KB0073702
calendar_today
Updated On:
Description
Certain operations (for example : fetching custom preferences) in the CustomDataSource class gives an exception "Attempt to perform an operation on an incorrect thread. Use ApplicationThread.Invoke() to invoke into the application thread."
For such operations resulting in the above exception indicates that the data source should be loaded on the application thread.
Issue/Introduction
Certain operations for example fetching custom preferences using this.GetService< PreferenceManager >(serviceProvider) in the CustomDataSource class requires the caller to be on the application thread.
Environment
All Supported Operating Systems