web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

System.ServiceModel.FaultException

(0) ShareShare
ReportReport
Posted on by 6

Hi All.

          I am converting the crm 4.0 code into mscrm 2013,

while editing the gridview it throws the below error.

An exception of type 'System.ServiceModel.FaultException`1' occurred in Microsoft.Xrm.Sdk.dll but was not handled in user code

Additional information: System.InvalidCastException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #49B35F5E

  

newPayrate.Attributes["new_rate"] = new Microsoft.Xrm.Sdk.Money();

newPayrate.Attributes["new_rate"] = Convert.ToDecimal(txtAmountdollar.Text);

The above lines are taking the values from the gridview and assigning those to attributes of that particular entity . in this case newPayrate is the entity .

when taking all the values it is throwing an error when calling update method of  organization service proxy.

in our case it is _service.Update(newPayrate); here it is throwing the above error .

Kindly help me for this scenario.

Thanks in Advance

 

 

*This post is locked for comments

I have the same question (0)
  • EmployeeOcta Profile Picture
    6 on at

    Thanks for the reply .

    i have added the above lines in my code wherever necessary.

    Now on the same line as stated in the previous error i.e. _service.Update(newPayrate)

    a new error is coming as stated below.

    An exception of type 'System.ServiceModel.FaultException`1' occurred in Microsoft.Xrm.Sdk.dll but was not handled in user code

    Additional information: Incorrect attribute value type System.Int32

  • Mahendar Pal Profile Picture
    45,095 on at

    Hello,

    Write your code under try and catch block to and parse details error message, it will give you complete details why you are getting this error

    you can refer: msdn.microsoft.com/.../gg327884.aspx

    Thanks

  • EmployeeOcta Profile Picture
    6 on at

    new_rate is a currency type.

  • EmployeeOcta Profile Picture
    6 on at

    System.Web.UI.WebControls.Label lblId = (System.Web.UI.WebControls.Label)gvPayRate.Rows[e.RowIndex].FindControl("lblId");

    Guid currentID = new Guid(lblId.Text);

    newPayrate.Attributes["new_payrateid"] =currentID

    These above lines are getting the values from the gridview.

    and i am sending this for update.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans