wrapSharePointService
@spartanfx/react / codeapps / wrapSharePointService
Function: wrapSharePointService()
function wrapSharePointService<T>(service, options?): T;
Wrap a generated pac code SharePoint service so that create() /
update() payloads have their reference-column string values
automatically expanded to the { Value, Id, "@odata.type" } shape the
connector requires.
Detection is lazy: the wrapper probes each string-valued field in the
payload via service.getReferencedEntity('', column). Hits are cached
for the lifetime of the wrapper; misses are cached too, so plain-text
columns are only probed once.
Read methods (get, getAll) are passed through unchanged — use the
matching useCA* hook (or call normalizeRecord yourself) when
you need read-side flattening.
Type Parameters
T
T extends IWrapableSharePointService
Parameters
service
T
options?
IWrapSharePointServiceOptions = {}
Returns
T