I have to create a new record on DirPartyTable .
I used this code:
DirPartyTable _myDirPartyTable;
myPartyNumber = DirPartyTable::getNewPartyNumber((webSession() == null));
myDirPartyTable = DirPartyTable::createNew(myPartyType , myName, myPartyNumber);
// or without partynumber
myDirPartyTable = DirPartyTable::createNew(myPartyType , myName);
But in both cases the standard method generate two Sequence ParyNumber. In Debu mode I saw the system get two times the PartyNumber .
How can I create a record without creating holes in the sequence numeric?
I tried to use this another code:
select forupdate myDirPartyTable;
myDirPartyTable.name = ....;
//etc
myDirPartyTable.insert();
But does not create the record.
Thanks, enjoy!