This is a new series, where I will show you how things are done in Siebel and how the same thing can be done in Salesforce. Will leave the decision upto you to tell me which one is easier and which one is better.
ToChar(Today(),’YYYY’) + ToChar(Today(),’MM’) + ToChar(Today(), ‘DD’)
ToChar([Date Of Birth], ‘YYYY’) + ToChar([Date Of Birth], ‘MM’) + ToChar([Date Of Birth], ‘DD’)
The Under Age flag : IIf(([Step1] – [Step2]) < “180000”, “Y”, “N”)
We are doing these three steps mainly because :
- Siebel does not have good list of functions supported in calculated fields.
- Siebel does not have data type conversion in calculated fields.
In Salesforce if you have to do this activity, you just need one formula field with following calculation.
IF( NOT( ISBLANK( Birthdate ) ) ,
IF( DATE( 2000 , MONTH( Birthdate ) , DAY( Birthdate ) ) <= DATE( 2000 , MONTH( TODAY() ) , DAY( TODAY() ) ),
YEAR (Today()) - YEAR ( Birthdate ),
YEAR (Today()) - YEAR ( Birthdate ) -1 ),
null)
Learn more about list of functions available in Siebel here: https://docs.oracle.com/cd/B40099_02/books/ToolsDevRef/ToolsDevRef_Operators8.html
and Full list of salesforce functions are here: https://help.salesforce.com/articleView?id=customize_functions.htm&type=5
But coming to think of it, shouldn't a modern CRM have a built in function which can take a DOB and return age ? Why should developers still right such functions ?
ReplyDeleteIt is 2020.
Alright, both CRM should have it out of the box age field. Siebel 0, salesforce 0.
ReplyDelete