Id flag with built-in validation. Short character is i

import { Flags } from '@salesforce/sf-plugins-core';
public static flags = {
// set length or prefix
'flag-name': salesforceId({ length: 15, startsWith: '00D' }),
// add flag properties
'flag2': salesforceId({
required: true,
description: 'flag2 description',
}),
// override the character i
'flag3': salesforceId({
char: 'j',
}),
}
  • Parameters

    Returns OptionFlag<string, CustomOptions>

  • Parameters

    Returns OptionFlag<undefined | string[], CustomOptions>

  • Parameters

    Returns OptionFlag<undefined | string, CustomOptions>

  • Parameters

    • options: IdFlagConfig & {} & (({ required: true; } | { default: FlagDefault<string | undefined, IdFlagConfig>; }) & Partial<OptionFlag<string, IdFlagConfig>>)

    Returns OptionFlag<string, CustomOptions>

  • Parameters

    • options: IdFlagConfig & {} & (({ required: true; } | { default: FlagDefault<string[] | undefined, IdFlagConfig>; }) & Partial<OptionFlag<string[], IdFlagConfig>>)

    Returns OptionFlag<string[], CustomOptions>

  • Parameters

    • options: IdFlagConfig & {} & (({ required: true; } | { default: FlagDefault<string | undefined, IdFlagConfig>; }) & Partial<OptionFlag<string, IdFlagConfig>>)

    Returns OptionFlag<string, CustomOptions>

  • Parameters

    Returns OptionFlag<undefined | string, CustomOptions>

  • Parameters

    Returns OptionFlag<undefined | string, CustomOptions>

  • Parameters

    Returns OptionFlag<undefined | string, CustomOptions>

  • Parameters

    Returns OptionFlag<undefined | string[], CustomOptions>