• Skip to main content
  • Skip to primary sidebar
  • Home
  • About
  • Recommended Readings
    • 2022 Book Reading
    • 2023 Recommended Readings
    • Book Reading 2024
    • Book Reading 2025
  • Supply Chain Management Guide
  • PKM
  • Microsoft Excel
  • Microsoft Copilot in Office 365
  • Public Wiki Page

Ali Raza Zaidi

A practitioner’s musings on Dynamics 365 Finance and Operations

Favorites

The Architecture Journal latest Issue

December 14, 2007 by alirazazaidi

The Architecture Journal Lastest issue is avaliable, you can download it from here

Most Wanted Regular Expressions

September 5, 2007 by alirazazaidi

Just wanted to share this little collection of “Most Wanted Regular Expressions”

Regular expression examples for decimals input

Positive Integers — ^d+$
Negative Integers — ^-d+$
Integer — ^-{0,1}d+$
Positive Number — ^d*.{0,1}d+$
Negative Number — ^-d*.{0,1}d+$
Positive Number or Negative Number – ^-{0,1}d*.{0,1}d+$
Phone number — ^+?[ds]{3,}$
Phone with code — ^+?[ds]+(?[ds]{10,}$
Year 1900-2099 — ^(19|20)[d]{2,2}$
Date (dd mm yyyy, d/m/yyyy, etc.) — ^([1-9]|0[1-9]|[12][1-9]|3[01])D([1-9]|0[1-9]|1[012])D(19[0-9][0-9]|20[0-9][0-9])$
IP v4 — ^(d|[1-9]d|1dd|2[0-4]d|25[0-5]).(d|[1-9]d|1dd|2[0-4]d|25[0-5]){3}$

Regular expression examples for Alphabetic input

Personal Name — ^[w.’]{2,}([s][w.’]{2,})+$
Username — ^[wd_.]{4,}$
Password at least 6 symbols — ^.{6,}$
Password or empty input — ^.{6,}$|^$
email — ^[_]*([a-z0-9]+(.|_*)?)+@([a-z][a-z0-9-]+(.|-*.))+[a-z]{2,6}$
domain — ^([a-z][a-z0-9-]+(.|-*.))+[a-z]{2,6}$

Url —   http://([w-]+.)+[w-]+(/[w- ./?%&=]*)?

Other regular expressions

Match no input — ^$
Match blank input — ^s[t]*$
Match New line — [rn]|$

Common Table Expression

July 11, 2007 by alirazazaidi

There’s a good article here by Frank Kerrigan on a way to implement paging in SQL Server 2005 by using Common Table Expressions (CTE’s).

What are CTE’s?  This is a new feature of SQL Server 2005 that helps you eliminate temp tables and cursors in your queries.  You can generate some pretty amazing queries using recursive CTE’s, but that’s not what Frank is trying to demonstrate.  Anyway, they can be used similarly to a derived table.

Here’s the syntax:

[ WITH <common_table_expression> [ ,...n ] ]  <common_table_expression>::=         expression_name [ ( column_name [ ,...n ] ) ]     AS         ( CTE_query_definition ) 

Code to upload file in c#

May 7, 2007 by alirazazaidi

protected void btnUploadFile_Click(object sender, EventArgs e){

string sFilename = “”;// Check file size (mustn’t be 0)

HttpPostedFile myFile = FileUploading.PostedFile;int nFileLen = myFile.ContentLength;

if (nFileLen==0){

lblMsg.Text=“No valid file for upload.”;// return;

}

else

{

byte[] myData=new Byte[nFileLen];myFile.InputStream.Read(myData, 0, nFileLen);

sFilename=System.Guid.NewGuid().ToString().Replace(“-“, “”)+“_”+System.IO.Path.GetFileName(myFile.FileName);// Save the stream to disk

System.IO.FileStream newFile=new System.IO.FileStream(Server.MapPath(TaskManagementTool.Config.Path+sFilename), System.IO.FileMode.Create);newFile.Write(myData, 0, myData.Length);

newFile.Close();

TaskManagementTool.TaskDB taskDB=new TaskManagementTool.TaskDB();taskDB.AddUploadedFile(Convert.ToInt32(lblTaskId.Text), sFilename, ckIsPrivate.Checked);ShowUploadFiles();

}

// Read file into a data stream

//return sFilename;

}

Place Cursor in the First Input Box Automatically

February 5, 2007 by alirazazaidi

protected void Page_Load(object sender, EventArgs e)
 {    FindFirstTextBox(this); }
 private bool FindFirstTextBox(Control ctl)
 {    bool foundControl = false;
    foreach (Control child in ctl.Controls)
    {
      if (child is TextBox)
       {
         System.Text.StringBuilder script =             new System.Text.StringBuilder();
          script.AppendFormat("function findFirstControl()n{1}n document.getElementById("{0}").focus();n{2}n",             child.ID, "{", "}");
        ClientScript.RegisterClientScriptBlock(this.GetType(),"findFirstControl", script.ToString(), true);
          foundControl = true;
          break;
       }
    if (FindFirstTextBox(child))
      {
       foundControl = true;
         break;
       }
     }
  return foundControl;
 }

Url Vaildator in asp.net

January 13, 2007 by alirazazaidi

buddy here is regular expression for Url Vaildation

“http://([w-]+.)+[w-]+(/[w- ./?%&=]*)?”

asp.net control would be look like

<asp:RegularExpressionValidator ID=”RegularExpressionValidator1″ ControlToValidate=”XYZl” ValidationExpression=”http://([w-]+.)+[w-]+(/[w- ./?%&=]*)?” runat=”server” ErrorMessage=”Invalid URL”></asp:RegularExpressionValidator>

enjoy

how to download file in .net

December 29, 2006 by alirazazaidi

Function DownloadFile(ByVal strFileName As String)Dim fs As FileStreamDim strContentType As String

Dim strPath = ConfigurationSettings.AppSettings(“DocumentsContainerLocal”)‘Dim strFileName As String = Request.QueryString(“DocumentFile”)

fs = File.Open(strPath & strFileName, FileMode.Open)

Dim bytBytes(fs.Length) As Byte

‘ Write the stream to the byte array

fs.Read(bytBytes, 0, fs.Length)

‘ Close the file stream to release the resource

fs.Close()

Response.AddHeader(“Content-disposition”, _

“attachment; filename=” & strFileName)

‘ Next we need to add some header information.

‘ These headers will tell the browser what it needs to do

‘ with the content we’re serving

Response.ContentType = “application/octet-stream”

‘ Now our headers are added, we can serve the content.

‘ To do this, we use the BinaryWrite() method of the server object

‘ This successfully streams our external file to the user,

‘ despite the fact that the file doesn’t exist

‘ anywhere inside the web application

Response.BinaryWrite(bytBytes)

‘ Call Response.End() so that no more

‘ content goes through to the client.

Response.End()

End Function

Who invented “CTRL + ALT + DEL ” key combination

August 24, 2006 by alirazazaidi

Have you ever thought of the person who invented “CTRL + ALT + DEL ” key combination. “David Bradley” He is the One who spent 1 minute and 23 seconds in writing the source code that rescues The world’s PC users for decades This extraordinary IBM employee is retiring on Friday, 25th March 2005 after a prolong service of 29 years. His formula forces obstinate computers to restart when they no longer follow other commands. By 1980, Bradley was one of 12 people working to create the debut. The engineers knew they had to design a simple way to restart the computer When it fails to respond the user Bradley wrote the code to make it work. Bradley says. “I did a lot of other things than Ctrl-Alt-Delete, but I’m famous for that one.” His fame and success is achieved each time a PC user fails. He Commented His relationship with Bill gates by saying “I may have invented it, but Bill gates made it famous by applying my formula When ever any Microsoft’s Windows operating system made by him CRASHES, Thus I win when ever he looses………..”

Window Live

July 6, 2006 by alirazazaidi

 got an invitation from Hotmail to try Hotmail Beta Live and without wasting a single moment I jumped into the site, accepted the invitation and sign in to see the new Hotmail. First it took a while to load all the scripts to provide client side processing functionality. Hotmail live will give you feeling that you are working inside Outlook. Resize columns, Spell check, move between folders and download mails without refreshing the page all the time. According to them, Hotmail Live will take over current Homail within few weeks, and hopefully evehotmaillive7et.jpgryone will be repeaing the benefits from the new exciting services. The sad part is, it does not provide all AJAX functionalities with browsers other then IE. However, Hotmail team will provide all the features for all browsers before the final release. This is how Homail Live looks like:

Why Use Forms Authentication?

June 20, 2006 by alirazazaidi

No of reasons that mostly developers use Form based authentication in their asp.net application

  • They have full control over the authentication code.
  • They have full control over the appearance of the login form.
  • Form based authentication works with any browser.
  • Form based authentication allows developer how to store user information.
  • Form Based authentication has some drawbacks as well.

    •  Developer have to create the user interface for users to log in.

    •  Developers have to maintain a catalog with user credentials.

    •   Developers have to take additional precautions against the interception of network traffic

Next Page »

Primary Sidebar

About

I am Dynamics AX/365 Finance and Operations consultant with years of implementation experience. I has helped several businesses implement and succeed with Dynamics AX/365 Finance and Operations. The goal of this website is to share insights, tips, and tricks to help end users and IT professionals.

Legal

Content published on this website are opinions, insights, tips, and tricks we have gained from years of Dynamics consulting and may not represent the opinions or views of any current or past employer. Any changes to an ERP system should be thoroughly tested before implementation.

Categories

  • Accounts Payable (2)
  • Advance Warehouse (2)
  • AI (1)
  • Asset Management (3)
  • Azure Functions (1)
  • Books (6)
  • Certification Guide (3)
  • ChatGPT (2)
  • Claude (1)
  • Customization Tips for D365 for Finance and Operations (62)
  • D365OF (60)
  • Data Management (1)
  • database restore (1)
  • Dynamics 365 (59)
  • Dynamics 365 for finance and operations (139)
  • Dynamics 365 for Operations (174)
  • Dynamics AX (AX 7) (134)
  • Dynamics AX 2012 (274)
  • Dynamics Ax 2012 Forms (13)
  • Dynamics Ax 2012 functional side (16)
  • Dynamics Ax 2012 Reporting SSRS Reports. (31)
  • Dynamics Ax 2012 Technical Side (52)
  • Dynamics Ax 7 (65)
  • Exam MB-330: Microsoft Dynamics 365 Supply Chain Management (7)
  • Excel Addin (1)
  • Favorites (12)
  • Financial Modules (6)
  • Functional (8)
  • General Journal (1)
  • Implementations (1)
  • Ledger (1)
  • Lifecycle Services (1)
  • Logseq (4)
  • Management Reporter (1)
  • Microsoft Excel (4)
  • MS Dynamics Ax 7 (64)
  • MVP summit (1)
  • MVP summit 2016 (1)
  • New Dynamics Ax (19)
  • Non Defined (9)
  • Note taking Apps (2)
  • Obsidian (4)
  • Personal Knowledge Management (3)
  • PKM (16)
  • Power Platform (6)
  • Procurement (5)
  • procurement and sourcing (6)
  • Product Information Management (4)
  • Product Management (6)
  • Production Control D365 for Finance and Operations (10)
  • Sale Order Process (10)
  • Sale Order Processing (10)
  • Sales and Distribution (5)
  • Soft Skill (1)
  • Supply Chain Management D365 F&O (5)
  • Tips and tricks (278)
  • Uncategorized (165)
  • Upgrade (1)
  • Web Cast (7)
  • White papers (4)
  • X++ (10)

Wiki

  • SCM

Copyright © 2026 · Magazine Pro On Genesis Framework · WordPress · Log in