Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL (Archived)

CallApplicWait - Different CpnyID (SL2011 SP2)

Posted on by 6,405

If SL is logged into CpnyID "A", can CallApplicWait be used to open a screen for CpnyID "B"?  I want to build an SDK/ObjectModel app that auto releases IN Batches in the 10.400.00 screen.  Works great when the batch is in the current logged in CpnyID, but we have IN Batches in multiple companies, and would like the 10.400.00 screen to be opened for the CpnyID of the Balanced IN Batch.  I don't think CpnyID is one of the parameters that is passed in the FormLoad event of that screen.

Only way I can see this working is to use the StartApplication command, where the CpnyID can be defined when opening the screen, but then I have to build logic to release the batches within the screen.

If I can use CallApplicWait, then the batches will release automatically.

Thoughts/ideas are appreciated.

*This post is locked for comments

  • Mark E Profile Picture
    Mark E 6,405 on at
    RE: CallApplicWait - Different CpnyID (SL2011 SP2)

    Can't tell you how helpful this has been.  I was also able to use that same ApplSetParmValue snippet to auto run a report for a selected Company (w/out loading a Template).  Never could figure out how to do that with ROI before.

    Thanks!!!!

  • PatG Profile Picture
    PatG on at
    RE: CallApplicWait - Different CpnyID (SL2011 SP2)

    I'm the author of that code ;)

  • Ram Peru Profile Picture
    Ram Peru 2,830 on at
    RE: CallApplicWait - Different CpnyID (SL2011 SP2)

    I tried too. It's worked perfectly. Awesome information. Thanks for your valuable info.

    you beauty PatG!!!!

  • Suggested answer
    Mark E Profile Picture
    Mark E 6,405 on at
    RE: CallApplicWait - Different CpnyID (SL2011 SP2)

    PatG,

    You Da MAN!!!! This approach works perfectly in SL2011 as well, I just did not find the "COMPANY" parameter listed in the documentation (SDK or ObjectModel).

    I just tried it and it worked perfectly!!!! No I can go ahead with my plan to use CallApplicWait like I wanted.

    Curious as to how you knew/found this info....

    Thanks!!!!!!!!

  • Verified answer
    PatG Profile Picture
    PatG on at
    RE: CallApplicWait - Different CpnyID (SL2011 SP2)

    Mark,


    The feature to do this was most likely introduced with SL 2015.  Prior to that you must logout/login to switch companies. This is true for CallApplicWait.

    I think the parameter for SL 2015 is [VBRDT]COMPANY=0060

    or Call ApplSetParmValue(PRMSECTION_VBRDT, "COMPANY", "0060") prior to the CallApplicWait.

  • Mark E Profile Picture
    Mark E 6,405 on at
    RE: CallApplicWait - Different CpnyID (SL2011 SP2)

    Is there a way in Object Model to switch the Company on a current logged in session, then launch CallApplicWait?  I don't want to logout/quit the current session, then login to a new Company.

  • Mark E Profile Picture
    Mark E 6,405 on at
    RE: CallApplicWait - Different CpnyID (SL2011 SP2)

    Thanks.  I was hoping there was a way to use CallApplicWait, and run a screen for a different company, but that does not appear to be possible.

  • Verified answer
    Ram Peru Profile Picture
    Ram Peru 2,830 on at
    RE: CallApplicWait - Different CpnyID (SL2011 SP2)

    Hello Mark E,

    You got the perfect idea to launch screen in different company. Because CallApplic & CallApplicWait API functions are just used to launch screen with the given parameters. User has to do the manual release using IN Batches (10.400.00). Also Release IN Batches accepts only Module & Batch Number as parameter. If we tried to pass company Id as parameter, IN Batches screen throws the blow error message.

    Forum1.PNG

    So you're using StartApplication function which accepts company Id as parameter. you can automate Release IN Batches screen without Manual Intervention. Also you must handle all the pop up message scenarios while you're going for automation. If you're not handling it, Custom SDK will stuck on each pop up message scenarios. 

    Hope You're well aware/known about this scenarios. It's just my two cent worth suggestion.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans