getNextId

Description

@SuppressWarnings("deprecation")
public static int getNextID (int AD_Client_ID, String TableName, String trxName)
{
boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue(MSysConfig.SYSTEM_NATIVE_SEQUENCE,false);
boolean adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS);

if(SYSTEM_NATIVE_SEQUENCE && !adempiereSys)
{
int m_sequence_id = CConnection.get().getDatabase().getNextID(TableName+"_SQ");
if (m_sequence_id == -1) {
// try to create the sequence and try again
MSequence.createTableSequence(Env.getCtx(), TableName, trxName, true);
m_sequence_id = CConnection.get().getDatabase().getNextID(TableName+"_SQ");
}
return m_sequence_id;
}

return MSequence.getNextID (AD_Client_ID, TableName, trxName); // it is ok to call deprecated method here
} // getNextID

I am try to get the output for that method it return empty data
aslo using
MSequence.getNextID (AD_Client_ID, TableName, trxName); // it is ok to call deprecated method here.
but i dont get the next ID for Table "m_product"

Environment

None

Activity

Show:
Heng Sin Low
May 18, 2014, 3:06 PM

Hi, Please don't use Jira to ask question, that's what the idempiere google group is for. For your question, note that the table name parameter is case sensitive, use "M_Product" instead of "m_product".

Hiep Lq
May 18, 2014, 3:12 PM

Hi , for report issue, I think need more detail.
step to redo?
it's redo ok in demo.idempiere.com?
what's diff in your env when can't redo it in demo.idempiere.com?
your know-how about reason

Assignee

Unassigned

Reporter

AhmedE

Labels

Tested By

None

Components

Affects versions

Priority

Major
Configure