How to Delete or Remove Substring from String by using DELSTR Function in BC D365

Using DELSTR Function in BC D365:

(1) In this blog, we will get to know about the use of the DELSTR function in BC D365. It removes a substring from a string.

(2) Syntax of DELSTR:

NewString := DELSTR(String, Position[, Length])

(3) Now let’s take an example and see the result as shown.

using DELSTR Function in BC D365 Code Unit

Message 1 is: Output is: This is a Solution

(4) Remarks from Microsoft, as shown.

  • If you omit Length, all the characters starting with Position are deleted until the end of the string.
  • If you omit Length and Position is less than 1, then an error is returned.
  • If you omit Length and Position is greater than the length of String, then String is returned unchanged.

Implementation of Basic Manufacturing in Business Central
How to Change Work Date in Microsoft Dynamics 365
Customize StrMenu or Dialog option at the time of Purchase Posting in D365 BC
Sales Shipped not Invoiced Report in BC D365
Finished Production Order in Business Central
Work with Dimensions– Microsoft Docs

Leave a Reply