Friday, August 3, 2018

Simple tool to replace a string or character in Microsoft Dynamics NAV

Ever got a task to replace a string or character in a string in Microsoft Dynamics NAV but unable to find the simplest solution for this problem.
Don't worry I have a simple solution for this task.

I have created a Codeunit which you can find below:

OBJECT Codeunit 50003 String Replaced
    Time=12:10:48 PM;
    Version List=;
            OldStringG    := 'OldString';
            ReplaceWithG  := 'New';
            SearchStringG := 'Old';

            NewStringG := ReplaceString(OldStringG,SearchStringG,ReplaceWithG);

      OldStringG@1000000001 : Text[250];
      SearchStringG@1000000002 : Text[250];
      ReplaceWithG@1000000003 : Text[250];
      NewStringG@1000000000 : Text[250];

    PROCEDURE ReplaceString@1000000007(OldStringP@1000000000 : Text[250];SearchStringP@1000000001 : Text[250];ReplaceWithP@1000000002 : Text[250]) NewStringL : Text[250];

      NewStringL:= DELSTR(OldStringP,STRPOS(OldStringG,SearchStringP)) + ReplaceWithP + COPYSTR(OldStringP,STRPOS(OldStringP,SearchStringP) + STRLEN(SearchStringP));


You can modify this code according to your needs to make it suitable for your requirement.

Enjoyed the topic, Please do subscribe to our newsletter to get updated with every post without a miss.

Thanks for reading,

Shubin Dongre

Wednesday, January 20, 2016

Error "Before you can perform printer-related tasks, you need to install a printer."

Before you can perform printer-related tasks, you need to install a printer

Ever got this error "Before you can perform printer-related tasks, you need to install a printer." While previewing a report in Microsoft Dynamics NAV Classic,

Error "Before you can perform printer-related tasks, you need to install a printer."

I got you a simple solution for this error.

How to get the SID of the User Account?

How to determine SID of User Account of Windows

Those who don't know what the SID is, I would like to tell you that the System ID or SID is a unique identifier assigned to each user in Windows Environment. SID is used to control access to various resources like Files, Registry Keys, network shares, etc.

Friday, January 15, 2016

Let us understand the ClientUserSettings.config file in Detail

ClientUserSettings config file logo in Microsoft Dynamics NAV

First of all, let's understand what the ClientUserSettings.config file does. When you first install the Microsoft Dynamics NAV Windows Client, the Specify parameters page in Microsoft Dynamics Setup asks you for the configuration information to enable the Microsoft Dynamics Windows Client to connect to Microsoft Dynamics NAV Server. This information is saved in ClientUserSettings.config file.

Infocodes in LS Retail V 5.05 ( Pos )

Infocodes In Ls Retail Pos microsoft dynamics navision

Infocodes :

Infocode is a trademark of LS Retail ehf. This are used to capture extra information regarding transactions made at the POS terminals in Dynamics NAV. You can apply an infocode to a particular action in Pos, for example when applying discount on particular transaction, Pos system will show a textbox with " Discount Reason " to cashier for an input.