Update the Blocked field of the Customer card
Roi
Member Posts: 33
Hi,
I need to update the Blocked field of the customer card according the customer cards Balance LCY value.If Balnce LCY > Credit Limit(LCY) of the customer card then Blocked field need to be update with 'Ship'.
I tried this by writing codes on the Balance LCY and Blocked fields onValidate triggers and then On Insert trigger of Customer. but its not updating properly in the Blocked fields.I think this is due to Balnce LCY is updating from Detail Cus Ledger Entry table.
Any idea?
Roi
I need to update the Blocked field of the customer card according the customer cards Balance LCY value.If Balnce LCY > Credit Limit(LCY) of the customer card then Blocked field need to be update with 'Ship'.
I tried this by writing codes on the Balance LCY and Blocked fields onValidate triggers and then On Insert trigger of Customer. but its not updating properly in the Blocked fields.I think this is due to Balnce LCY is updating from Detail Cus Ledger Entry table.
Any idea?
Roi
0
Comments
-
Balance LCY is a flowfield, so if you wrote code on the onvalidate of this field, it will have no effect. (if you want the value, you need to do a calcfield)
Just a suggestion : why not do this check in the posting routines? These codes adjust the balance so you have you trigger ?? ?0 -
Or in the OnInsert of Detailed Customer Ledger Entries...of course you'd have to check that they are all INSERT(TRUE).0
-
Hi,
I tried it by writing codes on the On Insert trigger of the Detail cust. Ledger entry,but its not updating the customer table.I entered Cash Receipt Journal and checked.
The code which I wrote as follows.
OnInsert()
IF INSERT = TRUE THEN
BEGIN
CustNo := "Customer No.";
Cust.SETFILTER(Cust."No.",CustNo);
IF Cust.FIND('-') THEN
BEGIN
Cust.New := TRUE;
Cust.MODIFY
END;
END;
Anyidea??
Roi0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
