You need to sign in to do that
Don't have an account?
Carolin 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
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
What is the error message shown? Do you see any GACK ID?Thanks