Passing variable from one form to another

Kazansky
Member Posts: 10
Dear Gurus
here is my situation:
I am trying to auto populate form that Prints checks (Report 1401). There is a record in the original table GenJnlLine."Bank No." that I would like to pass to my Form so I go:
BankAcc2."No." := GenJnlLine."Bank No.";
(this is in request form-> C/AL code -> in Openform trigger. )
The value BankAcc2 in my form is still blank. Please help
here is my situation:
I am trying to auto populate form that Prints checks (Report 1401). There is a record in the original table GenJnlLine."Bank No." that I would like to pass to my Form so I go:
BankAcc2."No." := GenJnlLine."Bank No.";
(this is in request form-> C/AL code -> in Openform trigger. )
The value BankAcc2 in my form is still blank. Please help
0
Comments
-
Can you show us your code?
It's hard to say... It could be the missingBankAcc2.MODIFY;
0 -
kapamarou wrote:Can you show us your code?
It's hard to say... It could be the missingBankAcc2.MODIFY;
This is what I have in the (second) Report - On OpenForm()
//- Populate Bank Account No. Begin
BankAcc2."No." := GenJnlLine."Bank No.";
//- Populate Bank Account No. End
IF BankAcc2."No." <> '' THEN BEGIN
IF BankAcc2.GET(BankAcc2."No.") THEN
UseCheckNo := BankAcc2."Last Check No."
ELSE BEGIN
BankAcc2."No." := '';
UseCheckNo := '';
END;
END;0 -
Kazansky wrote:This is what I have in the (second) Report - On OpenForm()
Not quite sure what you're trying to do - you mention "Report" then "On Open Form"
are you trying to modify the report or form?
If you want to set a default bank account - you can drill into the Batch Name and set the type Bank Account & Enter a Bank Account #.
In fact you can create several batch names for different banks and set the default accounts for each one.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions