Finding route journal name

Hi all,

pastedimage1511871102209v2.png

I’m trying to get the Route name using this code:

PJTab.JournalNameId = ProdJournalName::standardJournalName(ProdJournalType::RouteCard);

But its showing the below error:

The wrong number of arguments has been specified for the function.

Thanks in advance.

The method has another parameter (prodId), you should also pass that parameter while calling that method.

Example - ProdJournalName::standardJournalName(ProdJournalType::RouteCard, prodJournalTable.ProdId);

Yes, Kranthi.

Thank you.

prodJournalTable.JournalNameId = ProdJournalName::standardJournalName(ProdJournalType::RouteCard);
prodJournalTable.JournalNameId = ProdParametersDim::findDefault().RouteJournalNameId;

what is the difference between these both lines?

ProdParametersDim , is a table that hold the parameters by inventory dimension (by site).
ProdParametersDim::findDefault().RouteJournalNameId → this will give you the journal name assigned in the default parameters (with blank dimId)

ProdJournalName::standardJournalName(ProdJournalType::RouteCard); - this takes the production orders inventDim and return the journal name based on it (based on the site in the production order).

There will not be any difference with the result returned by these method, if you are not using production parameters by site.