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
Carolin HeynCarolin Heyn 

Date Formula in Flow Builder is not working

Hey everyone, 

I am using this formula in a Salesforce flow. In one variable I have stored the date value and then I want to add a runtime value from a related object. The formula itself causes no syntax error but when i try to run the flow. I get a error code and no info why the flow fails but obviously it is because of that formula. Becaus I tetsed a bit around. 

Does nyone knows why this isnt working in the flow?

DATE(
YEAR({!Get_first_Trade_Shipment.Date__c} ) + FLOOR( ( MONTH ({!Get_first_Trade_Shipment.Date__c}) +
({!Get_OppoProduct_Fields.Runtime__c}) - 1 ) / 12 ),
MOD( MONTH ({!Get_first_Trade_Shipment.Date__c}) +  ({!Get_OppoProduct_Fields.Runtime__c}) - 1 +
IF( DAY ({!Get_first_Trade_Shipment.Date__c}) > CASE( MOD( MONTH({!Get_first_Trade_Shipment.Date__c} ) + ({!Get_OppoProduct_Fields.Runtime__c})  - 1, 12 ) + 1,
2, 28,
4, 30,
6, 30,
9, 30,
11, 30,
31 ), 1, 0 ), 12 ) + 1,
IF( DAY({!Get_first_Trade_Shipment.Date__c} ) > CASE( MOD( MONTH({!Get_first_Trade_Shipment.Date__c} ) + ({!Get_OppoProduct_Fields.Runtime__c}) - 1, 12 ) + 1,
2, 28,
4, 30,
6, 30,
9, 30,
11, 30,
31 ),
1, DAY({!Get_first_Trade_Shipment.Date__c} )
)
)


BR Carolin
SwethaSwetha (Salesforce Developers) 
HI Carolin
What is the error message shown? Do you see any GACK ID?Thanks
Carolin HeynCarolin Heyn
It is no error message, just an error id Error ID: 498119539-245592 (777433070) that you can use for debugging. But its everytime another ID