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

    Class SalesforceProfileService

    Index

    Constructors

    Properties

    logger: Logger

    Methods

    • Adds record type visibility to a specified Salesforce profile.

      This method ensures that a given record type is visible to a specified profile. If the record type is identified by its ID, the method resolves its object type and developer name to construct the full record type name.

      Parameters

      • recordTypeIdOrName: string

        The ID or full name of the record type to add visibility for. If an ID is provided, it must start with '012' and will be resolved to its full name using the Salesforce Tooling API.

      • Optionalprofile: { id?: string; name?: string }

        An optional object containing the profile's ID or name. If not provided, the method will use the default profile. - id (optional): The ID of the profile. - name (optional): The developer name of the profile.

      Returns Promise<void>

      A promise that resolves when the record type visibility has been successfully added.

      If the record type ID is provided but cannot be resolved to a valid record type.

    • Retrieves a Salesforce profile by its developer name or ID. If no name or ID is provided, the current user's profile is returned.

      Parameters

      • OptionalprofileNameOrId: string

        The developer name or ID of the Salesforce profile to retrieve. If omitted, the current user's profile is returned.

      Returns Promise<SalesforceProfile>

      A promise that resolves to a SalesforceProfile object representing the retrieved profile.

      An error if the profile with the specified name or ID is not found.

    • Retrieves a list of profile developer names from Salesforce using the Tooling API.

      Returns Promise<string[]>

      A promise that resolves to an array of profile developer names.

      Will throw an error if the connection to Salesforce fails or if the query encounters an issue.