My code was working fine till yesterday. but now when I am trying to run my code I am getting System.Null Reference Exception. I have no idea why this is happening. I am getting this error on If condition.
My code:
public void Post(Message message)
{
CreateRecordsInCrm c = new CreateRecordsInCrm();
if (message.Current.pipeline_id == 1)
{
c.CheckCondition(message);
}
}
}
Message Class :
public class Message
{
public Current Current { get; set; }
}
public class Current
{
public string Status { get; set; }
public string Title { get; set; }
public string org_name { get; set; }
public string person_name { get; set; }
public string cc_email { get; set; }
public decimal value { get; set; }
public string owner_name { get; set; }
public int pipeline_id { get; set; }
public string person_id { get; set; }
public DateTime first_won_time { get; set; }
}