@dvelop-sdk
    Preparing search index...

    Function getBoEntity

    • Returns one specified entity from a model.

      Type Parameters

      • E = any

        Type for Entity. Defaults to any.

      Parameters

      Returns Promise<E>

      import { getBoEntity } from "@dvelop-sdk/business-objects";

      const jd = await getBoEntity({
      systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
      authSessionId: "3f3c428d452"
      },{
      modelName: "HOSPITALBASEDATA",
      pluralEntityName: "employees",
      keyPropertyType: "string", //"string", "number" or "guid"
      keyPropertyValue: "1"
      });
      console.log(jd); // { employeeId: '1', firstName: 'John Micheal', lastName: 'Dorian', jobTitel: 'senior physician' }

      You can also use generics:

      import { getBoEntity } from "@dvelop-sdk/business-objects";

      interface Employee {
      employeeId: string;
      firstName: string;
      lastName: string;
      jobTitel: string;
      }

      const jd: Employee = await getBoEntity<Employee>({
      systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
      authSessionId: "3f3c428d452"
      },{
      modelName: "HOSPITALBASEDATA",
      pluralEntityName: "employees",
      keyPropertyType: "string", //"string", "number" or "guid"
      keyPropertyValue: "1"
      });

      console.log(jd.lastName); // Dorian
    • Returns one specified entity from a model.

      Type Parameters

      • T

      Parameters

      Returns Promise<T>

      import { getBoEntity } from "@dvelop-sdk/business-objects";

      const jd = await getBoEntity({
      systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
      authSessionId: "3f3c428d452"
      },{
      modelName: "HOSPITALBASEDATA",
      pluralEntityName: "employees",
      keyPropertyType: "string", //"string", "number" or "guid"
      keyPropertyValue: "1"
      });
      console.log(jd); // { employeeId: '1', firstName: 'John Micheal', lastName: 'Dorian', jobTitel: 'senior physician' }

      You can also use generics:

      import { getBoEntity } from "@dvelop-sdk/business-objects";

      interface Employee {
      employeeId: string;
      firstName: string;
      lastName: string;
      jobTitel: string;
      }

      const jd: Employee = await getBoEntity<Employee>({
      systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
      authSessionId: "3f3c428d452"
      },{
      modelName: "HOSPITALBASEDATA",
      pluralEntityName: "employees",
      keyPropertyType: "string", //"string", "number" or "guid"
      keyPropertyValue: "1"
      });

      console.log(jd.lastName); // Dorian