New picklist in create case form stay empty in CRM

Dec 9, 2010 at 10:52 AM

Hi,

we want the customers to select the "Severity Code" when they create a case. So I added the field in the createcase.aspx and creasecase.aspx.cs. The field appears on the form and the values of the picklist too. But when I create the case, the field is empty in the CRM and on the portal. The text in the picklist in customized and is not in english.  

Can you help me ?

Thanks

Dec 9, 2010 at 3:18 PM

I would need to see the code to comment.  Can you either post the code to the forum or email it to me at shan underscore mcarthur at spamcop.net?

Thanks,
Shan

Dec 9, 2010 at 3:34 PM

I added the following lines to the createcase.aspx page (just under the Case Type field) :

<li>
<crm:CrmMetadataDataSource ID="SeverityCodeSource" runat="server"
AttributeName="severitycode"
EntityName="incident"/>
                
<asp:Label AssociatedControlID="Severitycode" runat="server"><crm:Snippet ID="Snippet1" runat="server" SnippetName="cases/createCase/severityCode" DefaultText="Gravité" /></asp:Label>
<asp:DropDownList ID="Severitycode" runat="server"
DataSourceID="SeverityCodeSource"
DataTextField="OptionLabel"
DataValueField="OptionValue" />
</li> 



And the line in italic to the createcase.apsx.cs

title = TitleTextBox.Text,
prioritycode = prioritycode,
casetypecode = int.Parse(CaseType.SelectedValue),
severitycode = int.Parse(Severity.SelectedValue),
subjectid = subjectid,
incident_customer_contacts_id = contact.contactid,
adx_createdbyusername = contact.fullname,
adx_createdbyipaddress = Request.UserHostAddress.ToStrin

 

Thank you.

Cyril

Dec 9, 2010 at 3:35 PM
Edited Dec 10, 2010 at 2:42 PM
Maybe it could be helpfull  : the createcase.aspx.designer.cs is not auto-generated.
Is it linked to the problem ?
I tried with the caseorigincode and the problem is exactly the same
Thank you