Customer Portal 2011 - Error when creating a case
-
2011年9月11日 17:04
Using the latest CRM 2011 Demo image with Customer Portal installed. All seems to work fine except for creating a case. The Title, Case Type and Description fields are filled in. When a user clicks the Create Case button the error below is generated:
Server Error in '/' Application.
Sequence contains no elements
Line 28: PriorityCode.SelectedValue = PriorityCode.Items.FindByText(ServiceContext.GetSiteSettingValueByName(Website, "case/prioritycode")).Value; Line 29: Line 30: var subject = XrmContext.SubjectSet.First(s => s.Title == ServiceContext.GetSiteSettingValueByName(Website, "case/subject")); Line 31: Line 32: var incident = new Incident
Source File: C:\Portals\CustomerPortal\CustomerPortal\Web\Pages\eService\CreateCase.aspx.cs Line: 30
Stack Trace:
[InvalidOperationException: Sequence contains no elements] Microsoft.Xrm.Sdk.Linq.QueryProvider.ThrowException(Exception exception) +12 Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute(QueryExpression qe, Boolean throwIfSequenceIsEmpty, Boolean throwIfSequenceNotSingle, Projection projection, NavigationSource source, List`1 linkLookups, String& pagingCookie, Boolean& moreRecords) +489 Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute(QueryExpression qe, Boolean throwIfSequenceIsEmpty, Boolean throwIfSequenceNotSingle, Projection projection, NavigationSource source, List`1 linkLookups) +131 Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute(Expression expression) +216 Microsoft.Xrm.Sdk.Linq.QueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) +85 System.Linq.Queryable.First(IQueryable`1 source, Expression`1 predicate) +590 Site.Pages.eService.CreateCase.CreateButton_Click(Object sender, EventArgs e) in C:\Portals\CustomerPortal\CustomerPortal\Web\Pages\eService\CreateCase.aspx.cs:30 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707
Mike
すべての返信
-
2011年10月17日 23:07モデレータ
One of the steps that is required to set up the customer portal is to configure your subject tree and set the "Site Setting" for "case/subject" to that subject. The error you are seeing indicates that the code could not locate the subject name for the default value of that site setting. This is covered in the installation guide.
Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com- 回答の候補に設定 Maria JoaquinMicrosoft Employee 2011年10月20日 22:31
-
2011年11月12日 3:40
Hi Shan,
We are having this same issue but we can´t find to what subject we must set the value for the "case/subject" site setting. We can´t find any reference to this in the installation guide.
The only diference is that we are working over our own crm organization and not with the sample data.
This is our only showstopper to buy your adx portals.
-
2011年11月12日 15:27モデレータ
The case entity requires a subject in CRM. What subject you use is irrelevent, just that you have to have a subject. Most organizations configure their subject heirarchy to make sense to their support system. The portal needs to know which subject to use when it inserts a new case, so it reads the value from a site setting. If you have an english install of CRM and you have not configured your subject tree, you could simply put "default subject" into the site setting.
Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com- 回答としてマーク Palak KadakiaMicrosoft Employee, Owner 2012年1月23日 2:42
-
2011年12月5日 23:29
I just had this happen to me.
The error is likely the result of a user changing the name of a subject that is also set as your site setting case/subject. You can find the site setting case/subject in Content Management -> Site Settings. You'll need to rename this to the new subject name, or a legitimate subject name in your subject tree.
Hope this helps.
www.sqlrepl.com- 回答としてマーク Palak KadakiaMicrosoft Employee, Owner 2012年1月23日 2:42