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)

What does SETRANGE fucntion does in C/AL code?

(0) ShareShare
ReportReport
Posted on by 12

What does SETRANGE function does in the object?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    60,969 Super User 2025 Season 2 on at
    RE: What does SETRANGE fucntion does in C/AL code?

    can you be more clear please?

  • Sulav Thapaliya Profile Picture
    12 on at
    RE: What does SETRANGE fucntion does in C/AL code?

    what is the use of setrange function?

    At what condition do u use this function?

  • Verified answer
    keoma Profile Picture
    32,729 on at
    RE: What does SETRANGE fucntion does in C/AL code?

    the setrange function is a record function used in c/al to filter records.

    e.g. lets say you declare variable CustRec with datatype record and subtype Customer.

    CustRec.SETRANGE("No.", '100'); filters all records of table customer to that one record, which has in field No. value 100. after that command you'll need a find function to activate that filter like CustRec.FindFirst.

    for further details follow

    msdn.microsoft.com/.../dd355053(v=nav.70).aspx

    msdn.microsoft.com/.../dd338835(v=nav.70).aspx

  • Verified answer
    Mohana Yadav Profile Picture
    60,969 Super User 2025 Season 2 on at
    RE: What does SETRANGE fucntion does in C/AL code?

    Please read this Microsoft help

    msdn.microsoft.com/.../dd355053.aspx

    Please contact in your office for the training.

  • mmv Profile Picture
    11,471 on at
    RE: What does SETRANGE fucntion does in C/AL code?

    Hi,

    In simple terms, it's used for filtering the data. 

    SETRANGE("Posting Date",01012015D,31012015D) will filter all the records in this date range.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#3
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans