Konrad Viltersten
Konrad Viltersten

Reputation: 39118

Wrong status reason when importing

I'm importing appointments and I get this error on all the instances.

State code is invalid or state code is valid but status code is invalid for a specified state code.

According to the values suggested in the dropdown, Completed is OK to use. All my entries have that in the column for StatusReason. Should I force the numerical value as specified here?

How can I resolve this stupid issue?

Further on, CRM says that 3 isn't going to work.

3 is not a valid status code for state code AppointmentState.Open on appointment.

However, I can't specify that the appointment is closed, because there's no such column (for Status or StateCode). Weird... Shouldn't that be inferred from the value I specify?!

Upvotes: 1

Views: 2119

Answers (1)

Jason Faulkner
Jason Faulkner

Reputation: 6558

I ran into a similar issue when we moved from Salesforce to CRM 2011. Going from memory, here are the steps I did:

  1. Created a new custom field in the appointment entity called ShouldBeClosed - I just used a text field.
  2. Updated my import sheet to have a value of yes for appointments which should be closed.
  3. Imported the appointments using the open status (which is really all the importer will allow you to do).
  4. Created a workflow to change the status of an appointment to the desired close state.
  5. Ran an advanced find for all appointments where ShouldBeClosed = yes and on the results I ran the workflow created in the previous step.

Once finished, you can remove the ShouldBeClosed field and the workflow which closes the record

Upvotes: 2

Related Questions