vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Class VlocityInterfaceInvoker

    Class to invoke methods on APEX classes that implement a VlocityObjectInterface in Salesforce using the Salesforce REST API.

    Index

    Constructors

    Properties

    connectionProvider: SalesforceConnectionProvider
    endPoint: "/services/apexrest/{vlocity_namespace}/v1/invoke" = '/services/apexrest/{vlocity_namespace}/v1/invoke'
    logger: Logger
    namespaceProvider: NamespaceService

    Methods

    • Invoke a Vlocity interface method in Salesforce with the specified input and options. If the method invocation results in an exception this method will throw an error.

      Type Parameters

      • T = any

      Parameters

      • methodSpec: string | { className: string; methodName: string }

        The method to invoke. Can be a string in the format 'class.method' or an object with className and methodName properties.

      • Optionalinput: string | object

        Input to pass to the method

      • Optionaloptions: string | object

        Options to pass to the method

      Returns Promise<T>

      The result of the method invocation

      // Invoke a method with a string
      const result = await invoker.invoke('MyClass.myMethod', { input: 'value' });