How can we store the flow field value into normal fieldvalue

uttar_naguttar_nag Member Posts: 19
I added one field named remaining amount2 in customer ledger entry table. I want to store value of remaining amount which is flow field to remaining amount2 normal field.It is possible or not?

Comments

  • awarnawarn Member Posts: 261
    Why would you need to do this? The simplest answer is no - although if you added the field you could fill it in during some sort of routine, but that would be highly inefficient.

    Remember if you are in code, just do CALCFIELDS and you will have access to the value in the field.

    CLE.GET(entry number here);
    MESSAGE(FORMAT("Remaining Amount")); //this shows 0
    CLE.CALCFIELDS("Remaining Amount");
    MESSAGE(FORMAT("Remaining Amount")); //this shows the actual amount
  • uttar_naguttar_nag Member Posts: 19
    where i write the code?. I want when sales order Post,after posting it will automatically refelected on customer ledger entry remaining amount fieldwhich is normal field.
  • rajpatelbcarajpatelbca Member Posts: 178
    hi,

    Check it in codeunit 80 Sales-Post.

    Regards,
    Experience Makes Man Perfect....
    Rajesh Patel
  • uttar_naguttar_nag Member Posts: 19
    i added the code in sales post where mentioned CustLedgEntry.calcfield(Amount) in on Run(). But after posting remaining amount flow field value not reflected in Remaining amount2 normal field. Please kindly checkit.

    wriiten the code in follwing:

    CustLedgEntry.GET("Entry No.");
    CustLedgEntry.CALCFIELDS("Remaining Amount");
    CustLedgEntry."Remaining Amt2":= "Remaining Amount";
    MESSAGE('%1',CustLedgEntry."Remaining Amt2");
    CustLedgEntry.update;
  • awarnawarn Member Posts: 261
    I would think this:

    CustLedgEntry.GET("Entry No.");
    CustLedgEntry.CALCFIELDS("Remaining Amount");
    CustLedgEntry."Remaining Amt2":= CustLedgEntry."Remaining Amount";
    MESSAGE('%1',CustLedgEntry."Remaining Amt2");
    CustLedgEntry.MODIFY;
  • uttar_naguttar_nag Member Posts: 19
    This code is not working in Sales post. Please kindly help me to solve this problem.
  • awarnawarn Member Posts: 261
    Darte I ask for more information (like what the message box says), or if anything is stored in the field?
  • DenSterDenSter Member Posts: 8,305
    uttar_nag wrote:
    I added one field named remaining amount2 in customer ledger entry table. I want to store value of remaining amount which is flow field to remaining amount2 normal field.It is possible or not?
    What do you want that for? There is already a field to store that value, so what's the point in creating another field with exactly the same value?
Sign In or Register to comment.