Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How to Update field in other table based on the first field ?!

(0) ShareShare
ReportReport
Posted on by 10

Hello Experts

I have a problem concerning the update method as i have made a new customized form and im trying to show the sum of the Credit and Debit in my form

first i made a new fields in my table and i put them in my form 

All i need is to update the credit and debit in my form based on the posted sum of GL Lines credit & debit  

here is the code that im using after the super in the update method in the LedgerJournalTrans update

select sum(AmountCurDebit), sum(AmountCurCredit) from _LedgerJournalTrans where this.LoanNo == _Sega_BankLoan.LoanNo && this.VoucherPosted == 1;
_Sega_BankLoan.Credit = this.AmountCurCredit;
_Sega_BankLoan.Debit = this.AmountCurDebit;
// _Sega_BankLoan.update();
}

please advise me if the logic of where to put my code and how to reach the right solution 

the fields in my table is not getting updated 

pastedimage1655362759058v2.png

and i tried select forupdate but i cant get the sum in so i went backward to this select statment 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,296 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,093 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans