I will present how to use ADF BC to get next value of sequence.
1- Creating Method
As we noticed in previous code that I use SequenceImpl to get sequence value.
2- Use that method at Entity Object Attribute to set default value of attribute
first set value type of attribute to Expression .
set Value as adf.object.getSequenceValue("My_seq_name").
3- Use getSequenceValue at Entity Object Impl
we can set default value to attribute of Entity Object in EntityObjectImpl class itself by overriding Create method and set attribute value to sequence value.
Thanks
Mahmoud A. El-Sayed
thanks
ReplyDeleteThanks for explaining the complete method to get sequence next value in ADF. This post has helped me a lot as I have been messing with it from past two three days. I will try to do now according to the mentioned steps.
ReplyDeletesap upgrades
Thanks
ReplyDeletefor help
but this solution is not optimal, it gets the id from a sequence before the commit , the best is execute the secuence when the insertion is ready, and after recover the id registry from the database that was assigned to the new row to refresh the record in the entity
ReplyDeleteregards from Ecuador
Nice Blog
ReplyDelete