Skip to content

Simple formula returning incorrect Field API name #6

Open
@phawthornffdc

Description

@phawthornffdc

https://github.com/pgonzaleznetwork/forcemula/blob/867b26d0f2b4cf8d06c1610f5c2c216d0012fd89/src/index.ts#L63C1-L64C1

Simple formula

IF(Indicator__c, 0 - Total__c, Total__c)

Is producing an incorrect result. It is prefixing Total__c field with a 0, e.g. Account.0Total__c

Steps to reproduce:

import parse from 'forcemula';
const { json: { customFields} } = parse({
	parentObject: "Account",
	formula: "IF(Indicator__c, 0 - Total__c, Total__c)"
});

Current Behaviour:

customFields are returned as:

[ 'Account.Indicator__c', 'Account.0Total__c' ]

Expected Behaviour:

customFields should be:

[ 'Account.Indicator__c', 'Account.Total__c' ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions