Code Monkey home page Code Monkey logo

Comments (8)

jordimontana82 avatar jordimontana82 commented on May 28, 2024 1

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.

synesthesia avatar synesthesia commented on May 28, 2024 1

@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.

jordimontana82 avatar jordimontana82 commented on May 28, 2024 1

@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.

jordimontana82 avatar jordimontana82 commented on May 28, 2024

That's no problem at all, @synesthesia

from fake-xrm-easy.

jordimontana82 avatar jordimontana82 commented on May 28, 2024

@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.

synesthesia avatar synesthesia commented on May 28, 2024

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.

jordimontana82 avatar jordimontana82 commented on May 28, 2024

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.

jordimontana82 avatar jordimontana82 commented on May 28, 2024

@synesthesia Adding #75 to cater for other scenarios related to Custom Apis

from fake-xrm-easy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.