Announcements
// Parameters var parameters = {}; parameters.ComponentId = null; // Id of the table parameters.ComponentType = 1; // Edm.Int32 parameters.SolutionUniqueName = "YourSolutionnAme"; // Edm.String parameters.AddRequiredComponents = false; // Edm.Boolean fetch(Xrm.Utility.getGlobalContext().getClientUrl() + "/api/data/v9.2/AddSolutionComponent", { method: "POST", headers: { "OData-MaxVersion": "4.0", "OData-Version": "4.0", "Content-Type": "application/json; charset=utf-8", "Accept": "application/json" }, body: JSON.stringify(parameters) }).then( function success(response) { return response.json().then((json) => { if (response.ok) { return [response, json]; } else { throw json.error; } }); } ).then(function (responseObjects) { var response = responseObjects[0]; var responseBody = responseObjects[1]; var result = responseBody; console.log(result); // Return Type: mscrm.AddSolutionComponentResponse // Output Parameters var id = result["id"]; // Edm.Guid }).catch(function (error) { console.log(error.message); });
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Valantis 474
WarrenBelz 375 Most Valuable Professional