stevenrasmussen / xrmtstoolkit Goto Github PK
View Code? Open in Web Editor NEWTypeScript library for Dynamics CRM JavaScript webservice methods
License: MIT License
TypeScript library for Dynamics CRM JavaScript webservice methods
License: MIT License
Simpler Software is our registered company name. Can we kindly ask you to please change the name you are using so that we can move forward with using our company name as a organization on GitHub?
I'm attempting calling a Soap Call from a call back from an Alert.Js Callback method. Unfortunately, I need to be able to perform a synchronous call, rather than an async call. Can we add an optional parameter to the Calls to be sync (they can be async by default, unless specified)?
Any reason the Soap Module is listed twice:
Ever thought of using Gitter? This type of post is really more of a discussion, and doesn't really belong as an "issue" IMHO. It's been very helpful for the XrmToolBox
I implemented a Qualify Lead Request. It's response type includes an EntityReferenceCollection. When parsing the result, the Last Entity Reference in the Collection is the only thing that gets returned.
These are some of the changes I had to implement to get it to work.
Added a EntityReferenceCollection Type:
type EntityReferenceCollection = Array<Soap.EntityReference>;
Added an EntityReferenceCollection Case in GetObjectFromBaseXRMObject:
case "EntityReferenceCollection":
CurrentObject = new Array<Soap.EntityReference>();
break;
Added the Request and Response classes:
export class QualifyLeadRequest extends ExecuteRequest {
constructor(
CreateAccount: boolean,
CreateContact: boolean,
CreateOpportunity: boolean,
LeadId: EntityReference,
SourceCampaignId?: EntityReference,
OpportunityCurrencyId?: EntityReference,
OpportunityCustomerId?: EntityReference
) {
super("QualifyLead");
this.Parameters["CreateAccount"] = new BooleanValue(CreateAccount);
this.Parameters["CreateContact"] = new BooleanValue(CreateContact);
this.Parameters["CreateOpportunity"] = new BooleanValue(CreateOpportunity);
this.Parameters["LeadId"] = LeadId;
if (OpportunityCurrencyId) {
this.Parameters["OpportunityCurrencyId"] = OpportunityCurrencyId;
}
if (OpportunityCustomerId) {
this.Parameters["OpportunityCustomerId"] = OpportunityCustomerId;
}
if (SourceCampaignId) {
this.Parameters["SourceCampaignId"] = SourceCampaignId;
}
this.Parameters["Status"] = new OptionSetValue(3); // Qualified
}
}
export class QualifyLeadResponse extends ExecuteResponse {
CreatedEntities: EntityReferenceCollection;
}
I've done a lot of formatting changes as well, but you probably won't care about them, and they don't apply to this issue. I just had to organize the code a little to understand why I what was happening. If you'd like a pull request, I'd love to give it to you and abandon my branch, but again, don't think that makes since.
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?
public static FilterNode = function (name) {
return this.find('*').filter(function () {
return this.nodeName === name;
});
};
I upgraded my project to Typescript 2.0 and received some compile errors. Are you planning on updating to 2.0?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.