In an effort to get round an issue related to finding child of child BO's where the ultimate parent hasn't been created in the database yet I am trying to build a serial number based on a number of theoretically unique properties, namely the current timestamp as a long number concatenated with the primary key of the current user.
How do you extract components of CURRENT_TIMESTAMP (i.e. YYYY, MM, DD) as a number. I have tried:
AS_NUMBER(CURRENT_YEAR)
and
AS_NUMBER(YEAR(CURRENT_TIMESTAMP))
but there seems to be a type issue as the log produces a message
Value was not changed because it was equal to the old value Year=null
I've also tried using the RANDOM function to generate a RANDOM number but I am getting an error message in the configurator that says
rule '' uses business object 'RANDOM' which has not been found
I'm going to proceed with a compound 2 field solution which is a bit annoying as I'd rather just have one number field to create a serial number.