Entry No. in Item ledg and value entry table

smkolsoftsmkolsoft Member Posts: 53
Dear All,
I am in a situation where i need to have custom Entry No. for ILE and VE.
That is I will have a No. Srs setup for Enrty No. field of the above two
tables.
In codeunit 22 (Nav 4.0 SP1) the "Code" function controls the entry no. of the tables by the following code.....
{
IF ItemLedgEntryNo = 0 THEN BEGIN
GlobalItemLedgEntry.LOCKTABLE;
IF GlobalItemLedgEntry.FIND('+') THEN
ItemLedgEntryNo := GlobalItemLedgEntry."Entry No.";
END;
IF ValueEntryNo = 0 THEN BEGIN
GlobalValueEntry.LOCKTABLE;
IF GlobalValueEntry.FIND('+') THEN
ValueEntryNo := GlobalValueEntry."Entry No.";
END;
}
The system then increases the global variables (ItemLedgEntryNo,ValueEntryNo) for each line item.

I am changing the code as follow..
[
// IF ItemLedgEntryNo = 0 THEN BEGIN
GlobalItemLedgEntry.LOCKTABLE;
IF GlobalItemLedgEntry.FIND('+') THEN;

ItemLedgEntryNo := MyCodeunit.GetLastNo();
// END;
]
Once the function "Code" is executed I Update the LastNo used in my No Srs with the value in the global variable ItemLedgEntryNo

I am testing the code....

But any suggestions from anybody here will be of great help.

Comments

  • krikikriki Member, Moderator Posts: 9,110
    Why would you need a customer Entry No.? :shock: :?: :-s #-o
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • smkolsoftsmkolsoft Member Posts: 53
    @Kirki

    I wrote " Custom Entry No." ....
    not Customer Entry No.
    i am talking about the Primary Key "Entry No" of ILE and VE
  • krikikriki Member, Moderator Posts: 9,110
    smkolsoft wrote:
    @Kirki

    I wrote " Custom Entry No." ....
    not Customer Entry No.
    i am talking about the Primary Key "Entry No" of ILE and VE

    I made a tipo : I meant "Custom Entry No.". But my question remains : why would you need it?
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • smkolsoftsmkolsoft Member Posts: 53
    Well..we r implementing LS Retail. We have several stores with thier DB
    and a HO. Items are received at stores and ILE and VE are replicated to HO. We do invoice at HO.
    say we have replicated a VE to HO with entry No 10000.
    when we create a invoice at HO a new VE with 10001 is created at HO.
    in meantime a receipt at Store level has produced a VE with same entry no. So when we replicate that VE to HO the old VE gets overwritten.

    We r using Data Dirctor2.2 to replicate between navison databases.
  • krikikriki Member, Moderator Posts: 9,110
    So it means you have a certain range of Entry No. per DB.
    -And when that DB gets out of its range?
    -And how about recalculation of item ledger entries?
    -And how about links between positive and negative Item ledger entries?
    -...

    Wouldn't it be better to just repeat the shipment and receipt and just add a field to indicate to which DB it is connected?

    I have to admit I don't know Data Director. Maybe someone else has some more info (or experience) with this.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • NRNR Member Posts: 78
    In such a situation , you can use the standard initial entry nos in location which provides the option to specify the starting entry no. for tables mentioned per location.
  • NRNR Member Posts: 78
    In such a situation , you can use the standard initial entry nos in location which provides the option to specify the starting entry no. for tables mentioned per location.

    If you addressed this kind of situation , kindly share the method adopted.
Sign In or Register to comment.