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
Jennifer Cohen 9Jennifer Cohen 9 

validation rule preventing process builder flow

I am trying to prevent users from copy and pasting the same URL into  two required fields. These fields only need to be entered when changing the status of opportunity. I created a validation rule stating:

Deal_Google_Drive_Link__c = Signed_SOW_Link__c 

Unfortunately, when trying to save it returns with the following error:

We can't save this record because the “Update Account Status to Customer” process failed. Give your Salesforce admin these details. 
This error occurred when the flow tried to update records: FIELD_CUSTOM_VALIDATION_EXCEPTION: The Signed SOW link and the Google Drive link must be different values. You can look up ExceptionCode values in the SOAP API Developer Guide.---

Error ID: 1471332392-127330 (1285127770)

This flow has nothing to do with either of those to fields. Is there another way to prevent my users from entering duplicated URLs?

Best Answer chosen by Jennifer Cohen 9
Maharajan CMaharajan C
Hi Jennifer,

Now i got it... If those fields will populated only once then you can use the below one...So this won't break anyother automaions...
 
AND(Deal_Google_Drive_Link__c = Signed_SOW_Link__c , 
OR( 
ISCHANGED(Deal_Google_Drive_Link__c ),
ISCHANGED(Signed_SOW_Link__c )
)
)

Please mark the best answre to close this thread...

Thanks,
Maharajan.C

All Answers

VinayVinay (Salesforce Developers) 
Hi Jennifer,

You can create a boolean field and when flow gets executed make it as false in flow condition so that whenever the criteria is met validation rule doesn't trigger on flow and it works when users copy and paste same url on UI.

Hope this helps.

Thanks,
Maharajan CMaharajan C
Hi Jennifer,

I don't know how are you controlling these two url fields population only while changing the status of opportunity. If somehow you done then only  add the stage check in validation rule.
AND(Deal_Google_Drive_Link__c = Signed_SOW_Link__c , ISCHANGED(StageName) )

Incase if you not yet handled the below line: you can use one more valdaition with below formula:
These fields only need to be entered when changing the status of opportunity.
 
AND(
NOT( ISCHANGED(StageName) ),
OR(
ISCHANGED(Deal_Google_Drive_Link__c),
iSCHANGED(Signed_SOW_Link__c) 
)
)

ERROR MSG : Google Drive Link, Signed SOW Link can only be changed or entered on opportnity status update.


Please use these formula as examples then try to explore by youself so you will get more learning. You can also merge ablove two rules into one...

Thanks,
Maharajan.C
Jennifer Cohen 9Jennifer Cohen 9
Majarajan,
I'm not trying to only control them when changing status, that is simply the only time users have the need to enter anything into those fields.  I think the original AND statement you provided will work to at least reduce the same URLs from being entered when the stage is changing. Thanks
Maharajan CMaharajan C
Hi Jennifer,

Now i got it... If those fields will populated only once then you can use the below one...So this won't break anyother automaions...
 
AND(Deal_Google_Drive_Link__c = Signed_SOW_Link__c , 
OR( 
ISCHANGED(Deal_Google_Drive_Link__c ),
ISCHANGED(Signed_SOW_Link__c )
)
)

Please mark the best answre to close this thread...

Thanks,
Maharajan.C
This was selected as the best answer