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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

What should be the clientType in GETURL function

(0) ShareShare
ReportReport
Posted on by 10

Hello 

I am trying to capture the URL with GETURL function

String := GETURL(ClientType [, Company] [, ObjectType] [, ObjectId] [, Record])

When I am running the report manunally, I am able to capture the URL with help of this function, but when the same report I am running from NAS, I am not able to capture the URL.

RecordLink.URL1:=GETURL(CLIENTTYPE::Current,COMPANYNAME,OBJECTTYPE::Page,900,AssemblyHdr);

I am using above  line of code to capture URL

I believe the clientType should be different for NAS but what it should be?

Thanks

Nishant

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Alexander Ermakov Profile Picture
    28,096 on at

    The URL is generated based on the client that invokes the code, provided that this is one of the client types that are specified in this list. If the URL is requested by another client type, such as a NAS session, Microsoft Dynamics NAV generates a URL based on the default client that is specified for the relevant Microsoft Dynamics NAV Server instance. If you specify current as the client type, the URL cannot be consumed by an OData web service.

  • Suggested answer
    Binesh Profile Picture
    7,885 on at

    Hello Nishant,

    For Windows:

    NewString := GETURL(CLIENTTYPE::Windows,COMPANYNAME,OBJECTTYPE::Page,PageID,RecRef,TRUE));

    For Web:

    NewString := GETURL(CLIENTTYPE::Web,COMPANYNAME,OBJECTTYPE::Page,PageID,RecRef,TRUE));

    Still if you have any doubt then see the Codeunit 1510 "Notification Management".

  • NishantNAV Profile Picture
    10 on at

    Thanks Alexander

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans