HI All ,
what could be the possible resolution for the below code to be converted as per mscrm 2013 for late
bound.
this is in mscrm 4.0 code.
CrmSDK.new_payrate newPayrate = new CrmSDK.new_payrate();
Label lblId = (Label)gvPayRate.Rows[e.RowIndex].FindControl("lblId");
CrmSDK.Key Id = new CrmSDK.Key();
Guid currentID = new Guid(lblId.Text);
Id.Value = currentID;
newPayrate.new_payrateid = Id;
after this i will take the another values from different textboxes as required.
and will call the service.Update(newPayrate); method.
Although at some level i have been able to change the old functionality to new one
but i am confused with this line of code.
as i have changed that code with below line of code
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;
There is an error when calling the this "_service.Update(newPayrate);" method saying
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
so i thought other values are correct but probably that "CrmSDK.Key Id = new CrmSDK.Key(); "
is getting some wrong value.
Kindly give me the ideas for this , how to resolve
Can anybody help me for this