SERVICE
This class is a "service" and it is automatically injected if declared as a member in the constructor of the consuming class.
- See the constructor section below for details
- See the Automatic Instance Injection page for details on the topic
The FileService class provides methods to work with files
Don't instantiate directly instances of the SqlQueryServiceclass.
SqlQueryService instances are automatically injected by Dynamics Mobile framework.
import { View, SqlQueryService } from'$dms';import { Customer } from'$dms-bo';@View()exportclassMyView {constructor(//we need to only declare the memberprivate SqlQueryService:SqlQueryService ){ }asyncload(){ //we can now use the injected instance let value =awaitthis.SqlQueryService.execute(`select * from ${Customer.boTableName}}`); }}
📳 Mobile
🌐 Backend
There is a difference in the behaviour of the FileService API in mobile and backend apps. Read the File Access documentation for more details