Comments (8)
Hi Julian (@synesthesia),
Thanks for raising this. Indeed, I see what you mean. The GetTargetForRequest was introduced mainly in the latest versions to support Pre and Post Images , which only apply to CRUD operations, which wouldn't be needed for custom API plugins actually, so we could probably refactor the ExecutePipelineStage methods to support that scenario.
Could you provide a sample unit test to reproduce if possible?
We're going to introduce several other improvements as part of pipeline simulation, and so this could be part of the next release.
from fake-xrm-easy.
@jordimontana82 happy to start my contribution with a demonstration failing test, but unlikely to be before end of the month as have a crunchy deadline at work :-)
from fake-xrm-easy.
@synesthesia No worries. I do have this in my radar, just wanted to release some very needed changes first for 2.2.0 and 3.2.0 versions but this is in the backlog.
from fake-xrm-easy.
That's no problem at all, @synesthesia
from fake-xrm-easy.
@synesthesia Thanks a mill for that PR.
You're right, it's only invoking plugin operations if there is a target.
I think we could workaround this problem by just passing in the OrganisationRequest's parameters into the InputParameters of the plugin when the request received is not one that requires a target (mostly CRUD operations), as you mentioned in the issue.
The target was mostly needed to take a snapshot of the data for new plugin images functionality, but that doesn't apply to custom actions / APIs.
Then, in a future release, we could add other enhancements to actually maybe introduce specific methods to register custom APIs and their associated input / output parameters, because then we could also validate their metadata (i.e. ranges, max length, mandatory / optional params etc).
But I'm happy to introduce that workaround first.
Thoughts? :)
from fake-xrm-easy.
Firstly @jordimontana82 huge apologies for delay in responding - I took most of the summer off and it has been mad since (of course).
I think that workaround makes a lot of sense.
I'd be happy to have a look on PR, but don't want to hold this up if it's something you can see a quick workaround .
from fake-xrm-easy.
Sorry for the delay on this one @synesthesia , I have reviewed your PR in detail, and I've added custom apis to 2.3.x version in another PR: DynamicsValue/fake-xrm-easy-plugins#27
Need to tweak build for older versions and review code coverage before merging.
But I've introduced a new method to register custom api's which will hopefully make it very easy to use them along with the new plugin registration functionality to automatically register plugin steps that will be shipped along with that release as well...
from fake-xrm-easy.
@synesthesia Adding #75 to cater for other scenarios related to Custom Apis
from fake-xrm-easy.
Related Issues (20)
- If 'max' aggregate query finds no rows it should return 0 not null HOT 1
- Generate mock data for out of the box entities in a similar way to faker does
- Preexisting PostImage attributes are not returned in pipeline simulation, only the target values.
- Revisit Pipeline execution with plugin with configurations and/or specific plugin instances
- Revisit support for key/value pairs (Open Types) in custom apis
- Replace old 3rd party 2011 CRM SDK assemblies by the equivalent official MS versions so that 2x can also be built in Mono
- Sql4Cds engine : RetrieveEntityRequest is not yet supported. HOT 6
- Validate EntityReferences with null logicalName on .Initialize() HOT 2
- AddMembersTeamRequestExecutor should validate the OOB limitation about Default Teams of Business Units: ErrorCodes.CannotAddMembersToDefaultTeam HOT 1
- InitializeFromRequest executor only supports TargetFieldType = All, and it throws an unsupported exception when a different field type is used
- Upgrade "2x-" GitHub actions to use Java 17 as 11 is deprecated for running Sonar Cloud Analysis
- RetrieveOptionSetRequest doesn't support retrieving option sets by MetadataId HOT 1
- 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
- RetrieveEntityRequest Message Not Implemented Error v2.3.1 HOT 3
- Automatic Registration in Pipeline Simulation expects SdkMessage, SdkMessageFilter, SdkMessageProcessingStep and PluginType when using early bound entities HOT 6
- ConditionOperator.In should not accept an array of integers as an argument HOT 1
- Review read access permissions for GitHub Packages restore in pull request workflows HOT 5
- CommercialUnsupportedException error can be misleading
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.