fake-xrm-easy icon indicating copy to clipboard operation
fake-xrm-easy copied to clipboard

Setting statecode to null does not work for a createrequest

Open GeusB opened this issue 4 years ago • 4 comments

I have a list of custom entities of which some could have a statecode. And I need to create them with an execute multiple. But having a statecode while creating doesn't work, so I set those statecodes to null. That works in my actual crm environments, and used to work in my unit tests. I updated the nuget from 1.47 to 1.55. And now the tests fail, because I get a faulted response and no entities are created. If i remove the statecode attribute from all the entities my tests work.

And now I'm wondering what I'm missing/doing wrong or if it might be an "issue"

GeusB avatar Sep 17 '19 06:09 GeusB

Hi Ben, if you could please provide a unit test example that would be handy.

Cheers

jordimontana82 avatar Sep 19 '19 20:09 jordimontana82

I'm not sure how much you want or how I should give it to you (I'm a github noob) But I made a public repo which has the minimum logic and the failing unit test

GeusB avatar Sep 20 '19 06:09 GeusB

Possible the same issue as https://github.com/jordimontana82/fake-xrm-easy/issues/479. @GeusB what is the exactly errormessage you get ??

johanvandam avatar Feb 14 '20 12:02 johanvandam

I get the practically the same. "When creating an entity with logical name 'cgk_bonus', or any other entity, it is not possible to create records with the statecode property. Statecode must be set after creation." And I see I forgot to make that repo, I'll fixed that booboo.

GeusB avatar Feb 14 '20 13:02 GeusB