function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DipilDipil 

ERROR: Function ISCHANGED may not be used in this type of formula

Hi,

 

i'm new to salesforce. I want to update a readonly field with a flag of true, only if one or more of some selected fields are updated in account. This is applicable only for update operation and not for new operation.

Below is the formula i'm trying to use but i'm getting the ERROR: Function ISCHANGED may not be used in this type of formula". All the "source MSAG fields" are of text type.

 

MSAG_UPDATE=

(formula below)

IF(AND(OR(
 ISCHANGED(MSAGServiceBuilding__c),
 ISCHANGED(MSAGServiceCity__c),
 ISCHANGED(MSAGServiceCommunity__c),
 ISCHANGED(MSAGServiceCountry__c),
 ISCHANGED(MSAGServiceFloor__c),
 ISCHANGED(MSAGServiceHouseNumber__c),
 ISCHANGED(MSAGServiceHousePrefix__c ),
 ISCHANGED(MSAGServiceHouseSuffix__c ),
 ISCHANGED(MSAGServicePostalCode__c ),
 ISCHANGED(MSAGServicePostDirectional__c ),
 ISCHANGED(MSAGServicePreDirectional__c ),
 ISCHANGED(MSAGServiceRoom__c ),
 ISCHANGED(MSAGServiceState__c ),
 ISCHANGED(MSAGServiceStreetName__c ),
 ISCHANGED(MSAGServiceStreetSuffix__c ),
 ISCHANGED(MSAGServiceSuite__c )),(NOT(ISNEW()))),
 TRUE,FALSE
)

 

I would appreciate your help. Thanks.

 

Regards,
Dipil Jain

@anilbathula@@anilbathula@
Hi Dilip jain,

I think you are using this formula in a formula field
If it is a formula field you cant use Ischanged function in formula field.
ISCHANGED() can be used only in this cases:-

Assignment rules
Validation rules
Field updates
Workflow rules if the evaluation criteria is set to Evaluate the rule when a record is: created, and every time it’s edited.
DipilDipil

Thanks Anil, i'm half way there with your Reply!

what if I want to do the field update only when update operation is performed on the record, not when records are created?

How to configure the workflow for that?

@anilbathula@@anilbathula@
Hi Dilip.

Select the work flow evaluation criteria as when ever a record is created and every time its edited.
Then copy the same formula in the rule criteria .how ever you or using NOT(ISNEW()) function ,so it wont for new created records and also you are using ISCHANGED() function it works only for updating a record not on inserting a new record.Then choose workflow action as field update and select the field you want to update with value.Then activate that workflow .