Start Dataport and change Warnings in Sales&Receivable S
MarcelW
Member Posts: 46
Hello,
I have a dataport to fill the Sales Journal ( Table: Gen. Journal Line).
It starts by clicking a button in the Form "Sales Journal".
The database has set the Warnings in the Sales & Receivalble Setup to "both warnings". Thats works as long as i do not use a customer that have no overdue balance, because then the warnings starts and the process cancels with the message:
"The following C/AL functions can only to a limited degree during write transactions(because one or more tables will be locked)
...
Form.runmodal()...
Codunit.run()...
..."
How can i handle this constraint? I tried to change the warnings to "no warning", start the dataport and after that set warnings back.
But i have no writing access to the table when i use the dataport?!
Please help!
I wisch u all very nice christmas days
I have a dataport to fill the Sales Journal ( Table: Gen. Journal Line).
It starts by clicking a button in the Form "Sales Journal".
The database has set the Warnings in the Sales & Receivalble Setup to "both warnings". Thats works as long as i do not use a customer that have no overdue balance, because then the warnings starts and the process cancels with the message:
"The following C/AL functions can only to a limited degree during write transactions(because one or more tables will be locked)
...
Form.runmodal()...
Codunit.run()...
..."
How can i handle this constraint? I tried to change the warnings to "no warning", start the dataport and after that set warnings back.
But i have no writing access to the table when i use the dataport?!
Please help!
0
Comments
-
I know the sales header and line table have a function that prevent this message from occuring when you set some parameter. Have you looked for this function in the general journal line?
Otherwise you may want to make one.0 -
I do not know about this warning on Gen. journal lines... may be some customization?0
-
Thx for the answers,
but cant find such method in gen. journal line or the sales header / line.
Some other ideas to solve this problem?
Marcel0 -
Look for this piece of code
Journal Template Name - OnValidate() Amount := ROUND(Amount,Currency."Amount Rounding Precision"); IF (CurrFieldNo <> 0) AND (CurrFieldNo <> FIELDNO("Applies-to Doc. No.")) AND ((("Account Type" = "Account Type"::Customer) AND ("Account No." <> '') AND (Amount > 0) AND (CurrFieldNo <> FIELDNO("Bal. Account No."))) OR (("Bal. Account Type" = "Bal. Account Type"::Customer) AND ("Bal. Account No." <> '') AND (Amount < 0) AND (CurrFieldNo <> FIELDNO("Account No.")))) THEN CustCheckCreditLimit.GenJnlLineCheck(Rec);
You can add a global variable HideValidationDialog
And create this function to activate itSetHideValidationDialog(NewHideValidationDialog : Boolean) HideValidationDialog := NewHideValidationDialog;
Then add the code to hide the thingy.0 -
If i understand u correct i should activate or deaktivate the boolean var and if the status is true do not start CustCheckCreditLimit.GenJnlLineCheck(Rec);
otherwise do.
I did so, bit it doesnt work. The same message appears if i
try to import the lines
But thanks for all until now!
Anyone with another idea?0 -
Can you please post the code? It should work.
Have you tried debugging?0
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

