Skip to main content

Posts

Backdate validation for user control in EP MSD axapta

If you are seeking code for Backdate validation for user control in Enterprise portal page for  axapta then below code can help you. Its tricky to find code on EP so its helpful for you. string cDate1 = DateTime.Now.ToString("dd/MM/yyyy"); int flag = 0; Proxy.Info objinfolog = new Proxy.Info(this.AxSession.AxaptaAdapter); DateTime x; DateTime a; Int32 r1; Date1 = txtDate1.Text; Ir = dsTestNewForm.GetDataSourceView("TestNewForm").DataSetView.GetCurrent().GetRecord(); if (txtDate1.Text != "" && Ir.GetField("Date1").ToString() == "1/1/1900 12:00:00 AM") { x = DateTime.Parse(cDate1, new CultureInfo("en-CA")); a = DateTime.Parse(Date1, new CultureInfo("en-CA")); r1 = DateTime.Compare(a, x); if (Ir.GetField("Date1").ToString() == "1/1/1900 12:00:00 AM" && r1 < 0 && Date1 != "")

Get Current date from User control on Enterprise portal web page in Visual studio for MSD axapta

To Get Current date from User control for  Enterprise portal page in Visual studio for axapta you can set below code and show in message box. string cDate1 = DateTime.Now.ToString("dd/MM/yyyy"); Proxy.Info objinfolog = new Proxy.Info(this.AxSession.AxaptaAdapter); objinfolog.add(cDate1); You can include above code in your click event or as per your required event. This code you need to write in visual studio . You need to add particular user control in visual studio project then open code file to write the code.