possible to change name of a posted journal

Question Status

Verified
Khosla asked a question on 7 Jul 2015 2:56 PM

hey folks, 

is it possible to change the name of an already posted journal? 

- Khosla 

Reply
Anton Venter responded on 7 Jul 2015 3:28 PM

Hi Khosla, why would you want to do that?

Reply
Khosla responded on 8 Jul 2015 9:08 AM

Anton,

Somebody in finance accidentally posted with the wrong name - but anyways, can we change it? Do you have any idea... I don't think so.

Reply
Anton Venter responded on 8 Jul 2015 1:36 PM

There would be no benefit in changing the name only because is has been posted already. You could reverse the posted journal and then create a new journal with the correct journal name.

Reply
Tatyana Becker responded on 23 Jul 2015 6:16 AM

No.

It's impossible.

Reply
Charne Ferreira responded on 23 Jul 2015 6:30 AM

Hi Khosla

Unfortunately not, it can only be renamed if it is still "Open".

Reply
Verified Answer
André Arnaud de Calavon responded on 23 Jul 2015 6:50 AM

It is only possible to change it in SQL directly or write a job with x++ statements and use the doUpdate() command to bypass the update validation checks.

On the user forms there is indeed no option to change it.

Reply
Kumarswami responded on 1 Aug 2017 9:44 AM

Hi andre,

how to write a job to update the posted journal.

Reply
Suggested Answer
Goutham Mahesh responded on 1 Aug 2017 12:23 PM

Hi Khosla,

As per Anton Venter Advise you can reverse the Wrong entries which was posted by your  Financial team posted wrongly and you can post the correct journal entries.

If you want to rename the journal it is a long time taking process.

Reply
Suggested Answer
Goutham Mahesh responded on 1 Aug 2017 12:25 PM

HI Kumarswami,

Here is the code format of solution:

public static updateRoutejb(Args args)

{

ProdRoute   ProdRoute ;

while select forupdate ProdRoute

{

  if (ProdRoute .QtyGood > 0)

  {

      ProdRoute.OprFinished = true;

      ProdRoute.update();

  }

  info ("Done");

}

}

Reply
André Arnaud de Calavon responded on 12 Aug 2017 1:54 PM

Hi Kumerswami,

If you haven't found a solution yet, please raise a new question on the forum. I don't think the code suggestion from Goutham is helping you as this is a script to update production routes; not journal names/descriptions.

Reply
Suggested Answer
Mahmoud Hakim responded on 12 Aug 2017 11:22 PM

just  update it from SQL direct, it is very easy and no change on business logic

Reply
Suggested Answer
Chaitanya Golla responded on 13 Aug 2017 1:08 AM

Hi,

Please use the following job to update journalName for the posted journal, provided

journaltype should be the same.

static void LedgerJournalTable(Args _args)

{

   LedgerJournalTable ledgerJournalTable;

   LedgerJournalName ledgerJournalName;

   select * from ledgerJournalTable

       where ledgerJournalTable.JournalNum =="XYZ"

       && ledgerJournalTable.JournalType == LedgerJournalType::Daily;

   select * from ledgerJournalName

       where ledgerJournalName.JournalName == "NewName"

       && ledgerJournalName.JournalType == ledgerJournalTable.JournalType;

   if (ledgerJournalName.RecId)

   {

       ttsBegin;

       ledgerJournalTable.selectForUpdate(true);

       ledgerJournalTable.JournalName = ledgerJournalName.JournalName;

       ledgerJournalTable.update();

       ttsCommit;

   }

}

Thanks,

Chaitanya Golla

Reply
Verified Answer
André Arnaud de Calavon responded on 23 Jul 2015 6:50 AM

It is only possible to change it in SQL directly or write a job with x++ statements and use the doUpdate() command to bypass the update validation checks.

On the user forms there is indeed no option to change it.

Reply
Suggested Answer
Goutham Mahesh responded on 1 Aug 2017 12:23 PM

Hi Khosla,

As per Anton Venter Advise you can reverse the Wrong entries which was posted by your  Financial team posted wrongly and you can post the correct journal entries.

If you want to rename the journal it is a long time taking process.

Reply
Suggested Answer
Goutham Mahesh responded on 1 Aug 2017 12:25 PM

HI Kumarswami,

Here is the code format of solution:

public static updateRoutejb(Args args)

{

ProdRoute   ProdRoute ;

while select forupdate ProdRoute

{

  if (ProdRoute .QtyGood > 0)

  {

      ProdRoute.OprFinished = true;

      ProdRoute.update();

  }

  info ("Done");

}

}

Reply
Suggested Answer
Mahmoud Hakim responded on 12 Aug 2017 11:22 PM

just  update it from SQL direct, it is very easy and no change on business logic

Reply
Suggested Answer
Chaitanya Golla responded on 13 Aug 2017 1:08 AM

Hi,

Please use the following job to update journalName for the posted journal, provided

journaltype should be the same.

static void LedgerJournalTable(Args _args)

{

   LedgerJournalTable ledgerJournalTable;

   LedgerJournalName ledgerJournalName;

   select * from ledgerJournalTable

       where ledgerJournalTable.JournalNum =="XYZ"

       && ledgerJournalTable.JournalType == LedgerJournalType::Daily;

   select * from ledgerJournalName

       where ledgerJournalName.JournalName == "NewName"

       && ledgerJournalName.JournalType == ledgerJournalTable.JournalType;

   if (ledgerJournalName.RecId)

   {

       ttsBegin;

       ledgerJournalTable.selectForUpdate(true);

       ledgerJournalTable.JournalName = ledgerJournalName.JournalName;

       ledgerJournalTable.update();

       ttsCommit;

   }

}

Thanks,

Chaitanya Golla

Reply