Hi,
Just high level:
- Create ASP.Net program and connect to CRM via SDK & Connection string.
- On page load; necessary aspx form validation.
- On button send/create/update:
- Store user entry from aspx to CRM case attribute.
- Prepare necessary validation in the code to create/update case record.
example:
//################################################################################
protected void Page_Load(object sender, EventArgs e)
{
if(fn_ConnectToMicrosoftCRMOnline())
{
txtFirstName.Focus();
if (!Page.IsPostBack)
{
DropDownDataBind();
}
}
}
//###########################################################################################################
private bool fn_ConnectToMicrosoftCRMOnline()
{
bool permission = false;
if (Convert.ToBoolean(ConfigurationManager.AppSettings["OnlineCRM"].ToString()) == false)
permission = CommonClass.Connect_CRMWindowsAuth();
else
permission = CommonClass.Connect_CRM();
lvObj_CRMServiceProxy = CommonClass.Proxy;
return permission;
}
//###########################################################################################################
private void DropDownDataBind()
{
ddlGender.DataSource = CommonClass.BindOptionSet("incident", "new_gender");
ddlGender.DataBind();
}
//################################################################################
protected void Button1_Click(object sender, EventArgs e)
{
Page.Validate();
if (Page.IsValid)
{
Mandatory = true;
Entity Incident= new Entity("incident");
//Text field.###########
if (txtFirstName.Text != string.Empty)
{
Volunteer.Attributes["new_name"] = txtFirstName.Text;
lbFirstName.Visible = false;
}
else
{
lbFirstName.Visible = true;
lbFirstName.ForeColor = Color.Red;
lbFirstName.Text = "Missing Mandatory Field";
Mandatory = false;
}
//DropDown.###########
if (Convert.ToInt32(ddlGender.SelectedIndex) > 0)
{
int test = Convert.ToInt32(ddlGender.SelectedValue);
Volunteer.Attributes["new_gender"] = new OptionSetValue(Convert.ToInt32(ddlGender.SelectedValue));
}
// Create Incident based on validation.###########
if ((CaptchaStatus) && (Mandatory))
{
lvObj_CRMServiceProxy.Create(incident).ToString();
System.Web.UI.ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AlertBox", "alert('Application submitted successfully.');", true);
ClearControls(this.Page);
}
//################################################################################