Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properties are not Supported For Custom Actions #5

Closed
daryllabar opened this issue Mar 8, 2016 · 3 comments
Closed

Properties are not Supported For Custom Actions #5

daryllabar opened this issue Mar 8, 2016 · 3 comments

Comments

@daryllabar
Copy link

I created a custom VerifyAddress Action with a property, but it's not working.

export class VerifyAddressResponse extends XrmTSToolkit.Soap.ExecuteResponse {

    /**
     * Action Response Stringified JSON
     */
    Response: string;

    private _responseObj: VerifyAddressResponse;
    get responseObj(): VerifyAddressResponse {
        if (!this._responseObj) {
            this._responseObj = JSON.parse(this.Response);
        }
        return this._responseObj;
    }
}

The property is undefined. Looks like the XrmTSToolkit just casts the Response to be the given type, but doesn't actually create one of that custom type. What's the best way to get this to work?

@daryllabar daryllabar changed the title Properties are not Actually Supported For Custom Actions Properties are not Supported For Custom Actions Mar 8, 2016
@daryllabar
Copy link
Author

I have resolved this by adding a CreateResponse method to the ExecuteRequest class, that then can be used to override the default instantiation. I'm not sure what you're plan was for this respository. Would you like to submit a pull request, or should I just keep my own fork of this? I'd like to contribute to your base, but this is "yours" and if you want to keep it more basic, I'll keep working on my fork.

@StevenRasmussen
Copy link
Owner

Hi Daryl, thanks for your feedback so far! I definitely want to make XrmTSToolkit as flexible as possible and will certainly accept contributions where it makes sense. Would you please submit a pull request for this so that I can take a look at what you've done here? It sounds like this functionality should be included. Thanks

@StevenRasmussen
Copy link
Owner

This was addressed in v0.8.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants