Name of the caller object

fazlehasanfazlehasan Member Posts: 69
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.

Comments

  • kinekine Member Posts: 12,562
    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.
  • fazlehasanfazlehasan Member Posts: 69
    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
  • slmaluwaslmaluwa Member Posts: 366
    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."
  • David_SingletonDavid_Singleton Member Posts: 5,479
    The write two separate functions in the code unit and call a different function depending on your needs.
    David Singleton
  • kinekine Member Posts: 12,562
    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.
  • fazlehasanfazlehasan Member Posts: 69
    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
Sign In or Register to comment.