Comments (6)
Hi @sybaris
You need to install the messages package and set it up in the middleware configuration.
Please have a look at the documentation for more details , in particular the Extra Messages Setup in the middleware docs:
https://dynamicsvalue.github.io/fake-xrm-easy-docs/quickstart/middleware/
And then more info about other message types:
https://dynamicsvalue.github.io/fake-xrm-easy-docs/quickstart/messages/overview/
Hope this helps, any questions let me know.
from fake-xrm-easy.
Hi
Thanks for your answer.
I have added these 2 lines in my MiddlewareBuilder :
.AddFakeMessageExecutors(Assembly.GetAssembly(typeof(RetrieveVersionRequestExecutor))) .AddGenericFakeMessageExecutors(Assembly.GetAssembly(typeof(NavigateToNextEntityOrganizationRequestExecutor)))
Now I have another error whn trying to connect using Sql4CdsConnection :
'Entity 'sdkmessagerequest' is not found in the metadata cache'
Any idea why we have this ?
Regards
Sybaris
from fake-xrm-easy.
Great that it was solved. As far as I know, there isn't a sdkmessagerequest entity, but a sdkmessage instead.
Maybe that?
Otherwise please provide a sample unit test so we can reproduce.
Thank you!
from fake-xrm-easy.
Hi
Here the test method to reproduce :
[TestMethod]
public void TestMethod1()
{
var context = MiddlewareBuilder
.New()
.AddCrud()
.AddFakeMessageExecutors()
.AddFakeMessageExecutors(Assembly.GetAssembly(typeof(RetrieveVersionRequestExecutor)))
.AddGenericFakeMessageExecutors(Assembly.GetAssembly(typeof(NavigateToNextEntityOrganizationRequestExecutor)))
.UseCrud()
.UseMessages()
.SetLicense(FakeXrmEasyLicense.RPL_1_5)
.Build();
var service = context.GetOrganizationService();
var organization = new Entity("organization");
organization.Id = Guid.NewGuid();
organization["name"] = "UnitTestOrganization";
context.Initialize(organization);
var connection = new Sql4CdsConnection(service);
}
I use mstest 4.6.2
And these packages nuget :
<package id="FakeXrmEasy.Abstractions.v9" version="2.3.0" targetFramework="net462" />
<package id="FakeXrmEasy.Core.v9" version="2.3.0" targetFramework="net462" />
<package id="FakeXrmEasy.Messages.v9" version="2.3.0" targetFramework="net462" />
<package id="MarkMpn.Sql4Cds.Engine" version="7.3.0" targetFramework="net462" />
I hope you will be able to reproduce and understand what happens...
Regards
Sybaris
from fake-xrm-easy.
Hi,
Any news about my last post with an example to reproduce ?
Regards
Sybaris
from fake-xrm-easy.
Thanks @sybaris for the info.
I was indeed able to reproduce . That message is an expected error message that happens when you try to query an entity record that doesn't exist and you're using late bound entity records.
In this case, Sql4CdsConnection constructor is trying to query "sdkmessagerequest" records which is triggered via a MetadataCache class in Sql4Cds's engine library. However no records of that type were provided in the .Initialize() call hence the error.
If you provide some test records via .Initialize() before calling such constructor (i.e. sdkmessagerequest) then it should work.
I'd suggest following it from there (looking at Mark's Sql4Cds source code) to see what other records might be needed but my understanding is that not an issue with FakeXrmEasy. https://github.com/MarkMpn/Sql4Cds/blob/5819139ad96dfa34007c3fcce6f87ac0100068d2/MarkMpn.Sql4Cds.Engine/MessageCache.cs#L60
I've seen you raised another issue at that repo that was closed, I'll add a few comments in there as well.
from fake-xrm-easy.
Related Issues (20)
- RetrieveOptionSetRequest doesn't support retrieving option sets by MetadataId HOT 2
- Remove ReleaseNotes from PackageDescription due to a 4000 char limit that will, sooner or later, make the push into Nuget crash
- Wrong ResponsibleType in CloseIncidentRequestExecutor HOT 1
- When using Automatic Registration in PipelineSimulation the new PluginInstancesRepository needs to be defined earlier so it's used by the automatic registration
- Remove unnecessary build steps from build scripts
- Update github actions to allow forks run their own analysis in their own sonar cloud account (free for OSS) HOT 21
- Add SharedVariables to pipeline simulation
- Add support for the new Bulk API (CreateMultiple, UpdateMultiple, UpsertMultiple) HOT 1
- v2.3.3 is significantly slower than v2.3.0 HOT 4
- Registering a plugin on RetrieveMultiple message in pipeline simulation only works without EntityLogicalName HOT 3
- Whether IXrmFakedContext support ExportPdfDocument message HOT 4
- Change default targetFramework in build scripts to "all" for simplicity
- Faked IServiceProvider should return null for unsupported types HOT 2
- One-to-many relationship metadata is not generated correctly. HOT 4
- RetrieveCurrentOrganisationRequest is missing HOT 4
- Update build scripts to use a shared packages folder across repositories for package restore
- GetRecordUniqueId crashes when InitializeMetadata is used to initialise an EntityMetadata that doesn't have any Keys, however works fine if using generated early bound types (_context.EnableProxyTypes()) HOT 1
- Improve pattern matching / wildcard support in LIKE operator implementation HOT 1
- Should support Operators where early bound types for a multi option set (i.e. multiple choice) is generated as an IEnumberable<TEnum> as opposed to an OptionSetValueCollection HOT 1
- New FetchXml enhancements and previously undocumented features
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fake-xrm-easy.