web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Opening Links Page via C/AL Code

(0) ShareShare
ReportReport
Posted on by 5,136

Hello, I am trying to open the LInks Page via C/AL code.  I was using below code to open it but it's not consistent and doesn't always work.  Basically, the links page is opened depending on the value of a checkbox and is triggered by the on validate event of the checkbox.  Below is my current code on validate:


          IF ISCLEAR(WSHShell) THEN
            CREATE(WSHShell,FALSE,TRUE);
            Window.OPEN('Links Page Opening...\\' + STRSUBSTNO(txtMsg,AddTxt));

            WSHShell.SendKeys('^l');   //simulate CTRL L - this is the one that opens the link page
            
            SLEEP(7000);  //to give the windows message a little bit of time to pop up a message for user 
        

            Window.CLOSE;

Any suggestion on a better way to open the links page?

*This post is locked for comments

I have the same question (0)
  • mmv Profile Picture
    11,471 on at
    RE: Opening Links Page via C/AL Code

    Hi,

    Could you try using the ExtendedDatatype mechanism used in the Home Page field on the Company Information?

  • mbr Profile Picture
    5,136 on at
    RE: Opening Links Page via C/AL Code

    Can you please elaborate further.  I don't quite understand. :(

  • Verified answer
    Suresh Kulla Profile Picture
    50,237 Super User 2025 Season 2 on at
    RE: Opening Links Page via C/AL Code

    Try to use TRUE,TRUE when you create automation and clear it after the process

    IF ISCLEAR(WSHShell) THEN
     CREATE(WSHShell,TRUE,TRUE);
     Window.OPEN('Links Page Opening...\\' + STRSUBSTNO(txtMsg,AddTxt));
     WSHShell.SendKeys('^l');   //simulate CTRL L - this is the one that opens the link page
           
     SLEEP(7000);  //to give the windows message a little bit of time to pop up a message for user 
       
    
     Window.CLOSE;
     CLEAR(WSHSHELL);


  • mbr Profile Picture
    5,136 on at
    RE: Opening Links Page via C/AL Code

    That did it!!!! Thank you Suresh.  I was wondering why it only works the first time.  But if I decide to unclick on the check button and click on it again which would trigger the popping of the link, it just won't work properly!  Yes!  Thank you much. I will test more but so far, it really seems to work gracefully.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#2
SC666 Profile Picture

SC666 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans