In InventJournalName table there is JournalNameId column and JournalType.
Using:
InventJournalNameId inventJournalName;
inventJournalName = InventJournalName::standardJournalName(InventJournalType::Movement);
I am indeed able to get a JournalNameId of type Movement from the InventJournalName table. To be more concise, the first one.
With the debugger I got to this point :
public static InventParameters find(boolean _forupdate = false)
{
InventParameters parameter;
if (_forupdate)
{
parameter.selectForUpdate(_forupdate);
}
select firstonly parameter
index Key
where parameter.Key == 0;
if (!parameter && !parameter.isTmp())
{
Company::createParameter(parameter);
PrintMgmt::createDefaultData(PrintMgmtHierarchyType::Invent);
}
return parameter;
}
To be honest, I can't really understand what's the role of the InventParameters table.
It's clear that:
select firstonly parameter
index Key
where parameter.Key == 0;
will return what I need but what's the mechanism behind the scenes?
Is there any difference between the above way and:
select firstOnly inventJournalName
where inventJournalName.JournalType ==
InventJournalType::Movement;