Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Global Procedeure

(1) ShareShare
ReportReport
Posted on by 41
Is there a way to make procedures available without the need to reference the codeunit they are contained in?  so for example just like i can reference functions like StrPos, of StrLen without any prefix codeunit.StrPos can I create my own functions and reference them in this way?
 
Thanks 
  • MH-06060002-0 Profile Picture
    MH-06060002-0 41 on at
    Global Procedeure
    Thanks everyone for their answers is anyone else having an issue when marking "Does this answer your question?" it doesnt seem to be working
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,178 Super User 2024 Season 2 on at
    Global Procedeure
    Unfortunately, this cannot be done. Even for system functions, if different namespaces are declared, a prefix is ​​required.
    For example,
     
    Thanks.
    ZHU
  • gdrenteria Profile Picture
    gdrenteria 12,794 Most Valuable Professional on at
    Global Procedeure

    Hi, good day
    I hope this can help you, and give you some hints.

    Dynamics 365 Business Central: “this” is a nice AL addition. – Stefano Demiliani

    Best Regards
    Gerardo

  • Suggested answer
    Khushbu Rajvi. Profile Picture
    Khushbu Rajvi. 5,443 on at
    Global Procedeure
    You cannot create global procedures that are accessible without referencing their containing object (like codeunits or modules) the same way built-in functions like StrPos or StrLen are. Built-in functions are part of the AL language itself and are globally available because they are implemented as part of the base runtime libraries.
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 9,969 Super User 2024 Season 2 on at
    Global Procedeure
     
    No, I don't think so. You have to follow MS's best practices in development. 
     
    Best regards,
    Mohamed Amine MAHMOUDI

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,560 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans