Hi All,
we had a requirement to create tool/ console application for creating SLA records
i have used the below code to create SLA record from console application but facing an issue with applicable from field it is not allowing date time value as this field is getting values from case entity. Please help me in creating the SLA through console application.
static void CreateSLA(IOrganizationService service)
{
Entity SLA = new Entity("sla");
SLA["createdon"] = DateTime.Now;
SLA["slatype"] = new OptionSetValue(1);
SLA["allowpauseresume"] = true;
//SLA["name"] = "SLA India";
SLA["applicablefrom"] = DateTime.Now; // this is not accepting date time value as this field is getting values from case entity
service.Create(SLA);
}