Select a Specific Name/string from Table

RKAgrawalRKAgrawal Member Posts: 5
edited 2021-03-01 in Navision Attain
Hi Friends,

How to select a specific name or string from table columns in C/AL code OR how to achieve if want to get a particular name or string by searching in multiple columns alongwith. Example search a name let's say rahul among two or three columns e.g. Name and Name 2 in customer table.

Best Answer

  • irasoelbaksirasoelbaks Member Posts: 119
    edited 2021-03-09 Answer ✓
    1. In our company we use a single instance codeunit to implement the singleton design pattern. Because it's instantiated once we can do integration with external applications like Microsoft Message Queue. And you need to instantiate some dotnet components (only once and persist it). We start this single instance codeunit by using the NAS feature on the NST (Nav Service Tier).
    2. Advantages are of course that it is only instantiated once. Data also persists between separate objects.

    A nice example can be found on https://www.archerpoint.com/blog/Posts/timers-single-instance-codeunits-and-nas-servicetier-nav-2013

    Good luck with your journey on single instance codeunits! There is plenty of information available out there on the web.

Answers

  • irasoelbaksirasoelbaks Member Posts: 119
    edited 2021-03-01
    Do you want to search from the GUI or search only from C/AL code?
  • RKAgrawalRKAgrawal Member Posts: 5
    I just want to use an optimize way, it can be either, in my current scenerio searching from C/AL code.
  • irasoelbaksirasoelbaks Member Posts: 119
    The FILTERGROUP(-1) could be used to create an OR filter.
  • RKAgrawalRKAgrawal Member Posts: 5
    edited 2021-03-08
    Hi Friends,

    I'm not getting any perfect scenerio or example of SINGLE INSTANCE CODEUNIT in NAV 2016. may anyone help me to find a best use of single instance codeunit so that i can get to know why we use single instance codeunit in navision.

    Thank you.!!
  • RKAgrawalRKAgrawal Member Posts: 5
    Hi irasoelbaks.!!

    Thank you for ypur reply.

    Yes i have gone through this post but still have few questions in mind.

    1- What scenerio we should use Single Instance CodeUnit.?
    2- What are the advantage of using Single Instance CodeUnit.?

    Many Thanks.!!
  • irasoelbaksirasoelbaks Member Posts: 119
    edited 2021-03-09 Answer ✓
    1. In our company we use a single instance codeunit to implement the singleton design pattern. Because it's instantiated once we can do integration with external applications like Microsoft Message Queue. And you need to instantiate some dotnet components (only once and persist it). We start this single instance codeunit by using the NAS feature on the NST (Nav Service Tier).
    2. Advantages are of course that it is only instantiated once. Data also persists between separate objects.

    A nice example can be found on https://www.archerpoint.com/blog/Posts/timers-single-instance-codeunits-and-nas-servicetier-nav-2013

    Good luck with your journey on single instance codeunits! There is plenty of information available out there on the web.
  • RKAgrawalRKAgrawal Member Posts: 5
    Thank You.!!
Sign In or Register to comment.