Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9213081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:40:01+00:00 2026-06-18T01:40:01+00:00

i have an issue: the error…` when creating a new record Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault,

  • 0

i have an issue: the error…` when creating a new record

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Expected non-empty Guid.Detail: 
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147220989</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>Expected non-empty Guid.</Message>
  <Timestamp>2013-01-31T09:23:30.4406111Z</Timestamp>
  <InnerFault i:nil="true" />
  <TraceText>

The Code…` sets the fields to values. i have also tried

Pline.Id = new Guid();

Pline.Id = a; //(a is a guid ref to parent record)


Entity Pline = new Entity("bc_packlines");
if (b.Attributes.ContainsKey("mins_sum"))
{
    BlockMins = ((Decimal)((AliasedValue)b["mins_sum"]).Value);
}

Pline.Attributes["bc_packlinesid"] = Pline.Id;
Pline.Attributes["bc_pack"] = a;
Pline.Attributes["bc_type"] = "948110004";
Pline.Attributes["bc_minutespurchased"] = BlockMins;
Pline.Id = a;
service.Create(Pline);

Any ideas please? Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:40:02+00:00Added an answer on June 18, 2026 at 1:40 am

    Some of that is a bit confusing, especially

    Pline.Attributes["bc_packlinesid"] = Pline.Id;
    // ...
    Pline.Id = a;
    

    You should not need to set the Id of your new entity explicitly so remove:

    Pline.Id = a;
    

    Edit: Also you say that a is the Guid to a parent record – so how/why would you set as the PK of another record? That won’t work fullstop.

    Secondly, in this line

    Pline.Attributes["bc_packlinesid"] = Pline.Id;
    

    You are setting the value of the field bc_packlinesid to an empty guid, as the Id of the record you are creating is not yet set. This means you are trying to get the entity to refer to itself? It doesn’t sound right to me but if it is, you will need to do this as a second step, after

    var newId = service.Create(PLine)
    

    Something like

    Pline.Attributes["bc_packlinesid"] = newId;
    service.Update(PLine);
    

    That is if that is even possible, I’m not sure if CRM will allow an entity to parent-child itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are new to ROR, We have issue in creating Login/Logout process in ROR
I have an issue with creating a transaction. I get an error back that
I most likely have a syntax issue (SQL command and error copied below) -
In my Action, I have an error of type System.MissingMethodException when I use TryUpdateModel.
I have an issue when running the application. I got error Apple LLVM compiler
I have an issue here with Wordpress themes, I get an error no matter
I have an issue, I'm trying to insert a new row into a postgres
I have an issue with cached error handling in X-Code. I commented a particular
I have an issue with CF9 ORM mapping. I get the following error from
I have strange issue. ModelState has error. But I don`t have a rule for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.