SObjectHandler
SObjectHandler
provides easy integrations with SObjects and CustomSettings.
To create a read handler, we can do this:
configService.onRead('/System/CustomButton/list', new Config.SObjectHandler('Custom_Button__c')
.fetch('SELECT Id, Name FROM Custom_Button__c')
.then(R.pluck.apply('Name'))
);
To create a write handler, we can do this:
configService.onWrite('/System/CustomButton/new', new Config.SObjectHandler('Custom_Button__c')
.doInsert(new Map{ ... });
);