Hey, I'm on the customer card page, I've created an action that opens a new page, on this new page, I want to get the customer number of this card automatically when I insert a new record in it . how can this be done?
did you check the standard actions like ship to addresses and bank accounts how the customer no. is automatically flown?
check the properties of the actions..
You want to manually open that Page from the Action Button and you want that customer no over there? Remaining field values you will then enter manually right?
I suggest that you store the customer no. value in a global variable on the second page which you're opening.
Make a function on the second page and pass one parameter "Cust_No" and when you open this page from customer card, open this page using RUNMODAL function and call the function and pass the Customer No. value from Customer card to this global variable.
Code on OnAction trigger of opening this page would look something like,
NewPage.AssignCustomer(Rec."No.");
NewPage.RUNMODAL;
Add the function AssignCustomer(LocalCustNo) in the new page and add code in it,
GlobalCustNo := LocalCustNo;
GlobalCustNo is the global variable and LocalCustNo is parameter in AssignCustomer function.
Answers
check the properties of the actions..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Try Once as Mohana Suggested.
You want to manually open that Page from the Action Button and you want that customer no over there? Remaining field values you will then enter manually right?
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/
Make a function on the second page and pass one parameter "Cust_No" and when you open this page from customer card, open this page using RUNMODAL function and call the function and pass the Customer No. value from Customer card to this global variable.
Code on OnAction trigger of opening this page would look something like,
NewPage.AssignCustomer(Rec."No.");
NewPage.RUNMODAL;
Add the function AssignCustomer(LocalCustNo) in the new page and add code in it,
GlobalCustNo := LocalCustNo;
GlobalCustNo is the global variable and LocalCustNo is parameter in AssignCustomer function.
Hope this helps.
Ishwar Sharma
My Blogs: Dynamics Community Blog | Blogspot
Connect: Google + | Twitter
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!