Create Package for CRM Package Deployement

Create Package for CRM Package Deployment : The package deployer is a new tool that enables administrators to deploy the packages to MicrosoftDynamics Crm Online and On_Premise instances. Ideally, if we are going to deploying a solution to the target instances via solution import (Login > Settings > Solutions) and if need to upload the data we are … Continue reading Create Package for CRM Package Deployement

Difference in days between two dates

 Difference in days between two dates : Here, we are stamping the diffrence in days between two dates i.e first date and second date. function days() { debugger; if (Xrm.Page.getAttribute("gb_firstdate").getValue() != null && Xrm.Page.getAttribute("gb_seconddate").getValue() != null ) { debugger; var days; var firstdate = Xrm.Page.getAttribute("gb_firstdate").getValue(); var seconddate = Xrm.Page.getAttribute("gb_seconddate").getValue(); if (firstdate > seconddate) days = … Continue reading Difference in days between two dates

Difference in Dates format DD MM YY

Difference in Dates : Recently, we have a requirement to show the difference between two dates in the following format DD MM YY. Here is the code to populate the difference data. function differencedates() { debugger; if (Xrm.Page.getAttribute("gb_firstdate").getValue() != null && Xrm.Page.getAttribute("gb_seconddate").getValue() != null) { debugger; var days; var firstdate = Xrm.Page.getAttribute("gb_firstdate").getValue(); var secondate = Xrm.Page.getAttribute("gb_seconddate").getValue(); if … Continue reading Difference in Dates format DD MM YY

Insert Logs to internal storage

Insert Logs to internal storage : Add a class file.cs extension to the solution. Paste the below code. using System; using System.IO; //Creating Logger Class public class Logger { //Creating method name as "Write" with input parameter public void Write(string Message) { try { DirectoryInfo directoryInfo; string str; string FileWrite; FileWrite = "Y"; str = … Continue reading Insert Logs to internal storage

Restrict Future Date

Restrict Future Date : Here, validating the date of birth. Generally, Date of Birth should not be a future date. It should always Past date. Here is the validation to allow only past dates. function futuredatevalidation() { if (Xrm.Page.getAttribute("gb_birthdate")  != null) { var birthdate = Xrm.Page.getAttribute("gb_birthdate").getValue(); if ( birthdate != null) { birthdate.setHours(0, 0, 0, … Continue reading Restrict Future Date