Closed VZhangTylerTech closed 9 months ago
Hi @VZhangTylerTech
If you are using the code generator for each function/action, two functions are generated: one to create the resource and another to call the endpoint.
Here's an example of these two functions that were automatically generated in the Caso
service of my application:
{
...
public crearIntervencionConRecursos(key: EntityKey<Caso>): ODataActionResource<{info: string, recursoIds: number[], requirenteIds: number[], expedienteId: number}, Intervencion> {
return this.entity(key).action<{info: string, recursoIds: number[], requirenteIds: number[], expedienteId: number}, Intervencion>('SIU.CrearIntervencionConRecursos');
}
public callCrearIntervencionConRecursos(key: EntityKey<Caso>, info: string, recursoIds: number[], requirenteIds: number[], expedienteId: number, options?: ODataActionOptions<Intervencion>) {
return this.callAction<{info: string, recursoIds: number[], requirenteIds: number[], expedienteId: number}, Intervencion>(
{info, recursoIds, requirenteIds, expedienteId},
this.crearIntervencionConRecursos(key),
'entity', options) as Observable<ODataEntity<Intervencion>>;
}
...
}
Need to know what the alternative way for the now protected customCollectionAction method. The original call is listed below; return this.customCollectionAction(entityType, body,
{
returnType: "Tyler.Cashiering.Business.Administration.AdministratableTenderType",
responseType: "entity"
});
Please provide the conversion example.