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?
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
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.
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.
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?
Comments
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
Check it in codeunit 80 Sales-Post.
Regards,
Rajesh Patel
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;
CustLedgEntry.GET("Entry No.");
CustLedgEntry.CALCFIELDS("Remaining Amount");
CustLedgEntry."Remaining Amt2":= CustLedgEntry."Remaining Amount";
MESSAGE('%1',CustLedgEntry."Remaining Amt2");
CustLedgEntry.MODIFY;
RIS Plus, LLC