You need to sign in to do that
Don't have an account?
Rst123
Auto number : Apex class issue
if parent record is same then child record will have same number with different version, increment in number will be based on (set of policy records) realted to parent records , so policy records having same parent will have same number.
But having standard autonumber will create new number for each child record created??
my requirement is to write logic for below condition :
==================
Parent : opportunity 1
Child records :
Pol - 1000 - v0
Pol - 1000 - v1 (if you observe the numbring 1000 is common for both child under opportunity 1)
===================
Parent : opportunity 2
Child records :
Pol - 1001 - v0
Pol - 1001 - v1 (if you observe the numbring 1001 is common for both child under opportunity 2)
==================
Parent : opportunity 3
Child records :
Pol - 1002 - v0
Pol - 1002 - v1 (if you observe the numbring 1002 is common for both child under opportunity 3)
But having standard autonumber will create new number for each child record created??
my requirement is to write logic for below condition :
==================
Parent : opportunity 1
Child records :
Pol - 1000 - v0
Pol - 1000 - v1 (if you observe the numbring 1000 is common for both child under opportunity 1)
===================
Parent : opportunity 2
Child records :
Pol - 1001 - v0
Pol - 1001 - v1 (if you observe the numbring 1001 is common for both child under opportunity 2)
==================
Parent : opportunity 3
Child records :
Pol - 1002 - v0
Pol - 1002 - v1 (if you observe the numbring 1002 is common for both child under opportunity 3)