mibuso.com

Microsoft Business Solutions online community
It is currently Fri May 24, 2013 4:04 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Name of the caller object
PostPosted: Tue Jun 26, 2012 3:13 pm 
Offline

Joined: Fri Jul 15, 2011 4:49 pm
Posts: 27
Country: Canada (ca)
Hi all.

I have one small question:

Say Object "X" is calling object "Y".
How Object "Y" can tell what is the caller object?
Is there any method in C/Side to get the name / no. of the caller object
other than using Single Instance Code Unit - like using set and get funtions?

Thanks.


Top
 Profile E-mail  
 
 Post subject: Re: Name of the caller object
PostPosted: Wed Jun 27, 2012 7:52 am 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Thu Oct 16, 2003 8:50 am
Posts: 12265
Location: Brno
Country: Czech Republic (cz)
No, there is no way for that. Why you need that? I do not know any business process which will need that.

_________________
Kamil Sacek
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.


Top
 Profile E-mail WWW  
 
 Post subject: Re: Name of the caller object
PostPosted: Wed Jun 27, 2012 3:59 pm 
Offline

Joined: Fri Jul 15, 2011 4:49 pm
Posts: 27
Country: Canada (ca)
Thanks for you reply

We need Item Tracking Lines (Form 6510) behave a little bit differently when called from Purchase Order (Form 50)
- like some fields would become disabled , some fields would be autofilled etc. based on which Form is calling it.

Thanks and regards
Fazle


Top
 Profile E-mail  
 
 Post subject: Re: Name of the caller object
PostPosted: Wed Jun 27, 2012 4:28 pm 
Offline
Site Supporter

Joined: Mon Jul 03, 2006 5:51 pm
Posts: 258
Location: ROAMING
fazlehasan wrote:
Thanks for you reply

We need Item Tracking Lines (Form 6510) behave a little bit differently when called from Purchase Order (Form 50)
- like some fields would become disabled , some fields would be autofilled etc. based on which Form is calling it.

Thanks and regards
Fazle


You may try adding a Global variable and setting its value before calling. and check for the flag in form opening.
there may be other better ways!

_________________
"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."


Top
 Profile E-mail  
 
 Post subject: Re: Name of the caller object
PostPosted: Wed Jun 27, 2012 4:36 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Aug 14, 2001 7:01 am
Posts: 5315
Location: Prague
Country: Czech Republic (cz)
The write two separate functions in the code unit and call a different function depending on your needs.

_________________
David Singleton
Dynamics NAV Freelancer
Dynamics Book
Go-Live International


Top
 Profile E-mail WWW  
 
 Post subject: Re: Name of the caller object
PostPosted: Wed Jun 27, 2012 4:44 pm 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Thu Oct 16, 2003 8:50 am
Posts: 12265
Location: Brno
Country: Czech Republic (cz)
You already have this in the form - variable CurrentSourceType is ID of table from where it was called (Sales Line, Purchase Line)… just look into existing code, there are conditions making the proces differend based on the calling source...

_________________
Kamil Sacek
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.


Top
 Profile E-mail WWW  
 
 Post subject: Re: Name of the caller object
PostPosted: Fri Jun 29, 2012 3:28 pm 
Offline

Joined: Fri Jul 15, 2011 4:49 pm
Posts: 27
Country: Canada (ca)
kine wrote:
You already have this in the form - variable CurrentSourceType is ID of table from where it was called (Sales Line, Purchase Line)… just look into existing code, there are conditions making the proces differend based on the calling source...


Thanks


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot], Pinkycz and 18 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: