mibuso.com

Microsoft Business Solutions online community
It is currently Tue May 05, 2015 8:11 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: How To pass parameters between objects (forms, reports, ...)
PostPosted: Tue Jul 05, 2005 2:40 pm 
Offline
Site Admin

Joined: Sun Nov 07, 1999 8:01 am
Posts: 2143
Location: Wilrijk, Belgium
Country: Belgium (be)
How To pass parameters between objects (forms, reports, ...)?

http://www.mibuso.com/howtoinfo.asp?FileID=7

Discuss this How To here.


Top
 Profile  
 
 Post subject: Good example for beginners
PostPosted: Tue Jul 05, 2005 2:49 pm 
Navision never explains so simply this principe : make function to pass parameters.


Top
  
 
 Post subject: great how-to
PostPosted: Tue Jul 05, 2005 2:56 pm 
This how-to is really great for beginners. When I was new in Navision programming world, it took me much time until I discovered how to pass parameters. I think, Navision (ehm, now MBS) should write better documentation for programmers, which should include "cheats" like this; documentation as Application designer's guide is insufficient, because it does not contain basic ideas.


Top
  
 
 Post subject: Passing parameters
PostPosted: Mon Oct 15, 2007 2:23 pm 
Offline

Joined: Wed Jan 03, 2007 4:03 pm
Posts: 2
Location: Norway
Country: Norway (no)
I have tried this and I have a Codeunit like this.


MESSAGE('HER ER før RESULTATET: %1',Comp);
form1.RUNMODAL;
MESSAGE('RESULT: %1',Comp);

SetSelskap(Selskap : Text[50])
Comp := Selskap;
MESSAGE('Value of Comp: %1',Comp);


Then I have Form, form1 whch gives a value to Selskap by calling the function Setselskap. The Message(Value of Comp: shows that the value of Comp is set correctly. and Comp is a variable in the Codeunit.

But at tyhe code( MESSAGE('RESULT',%1',Comp); THE VALUE OF Comp IS LOST

What is wrong with this code? ](*,)


Top
 Profile  
 
 Post subject: Re: How To pass parameters between objects (forms, reports,
PostPosted: Tue Feb 17, 2015 4:55 pm 
Offline

Joined: Tue Feb 17, 2015 4:41 pm
Posts: 1
Country: Germany (de)
Hello to you all!!

I am trying to pass a parameter from a page to a codeunit function that should start an report with the given parameters in the first place. The problem is that when the parameters are passed to the codeunit, the Record looses the filters. The Variable in the Codeunit is of type "Variant".

Could anybody give a hint as to why this happends? [-o<


Attachments:
File comment: here is the function from the codeunit. the parameter "Record" looses the filter (checked in debugger)
function in the codeunit.PNG
function in the codeunit.PNG [ 27.87 KiB | Viewed 495 times ]
File comment: calling the codeunit from the page
calling the codeunit.PNG
calling the codeunit.PNG [ 12.22 KiB | Viewed 495 times ]
Top
 Profile E-mail  
 
 Post subject: Re: How To pass parameters between objects (forms, reports,
PostPosted: Fri Feb 20, 2015 9:31 am 
Offline

Joined: Thu Oct 21, 2010 4:59 pm
Posts: 594
Location: Munich
Country: Germany (de)
For keeping the filters you need to pass the parameter by reference, ticking the "Var" field in the parameter list of your function.

_________________
* Daniele Rebussi * | * Rebu NAV Diary *


Top
 Profile E-mail WWW  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: