Without using the plugin registration tool or the CRM customizations form, how can you delete SDK message steps?
Is this possible in code using the XRM SDK. Also can plugins be deleted in code?
To get all the steps:
var step = xrmServiceContext.SdkMessageSet.FirstOrDefault(step => step.Name == "foobar");
To get all the plugin assemblies:
var plugin = xrmServiceContext.PluginAssemblySet.FirstOrDefault(p => p.Name == "foobar");
Once you get the GUIDs you would delete them like any other entity:
service.Delete(PluginAssembly.EntityLogicalName, plugin.Id);
If there are any dependencies, you would need to traverse up the dependency list and delete them first. Use RetrieveDependentComponentsRequest to fetch a list of all dependencies.
Related
I am integrating Jmeter test cases with Jenkins and using performance plugin able to see trend graph.
Is there any way to to send these graphs in jenkin's triggered email?
I am using Performance plugin of 3.11 version and email -ext plugin to send email.
While investing how to do it I found link
but it is not working in my case. In my jenkins project build path /test/trend path is not available.
Are we actually storing trend graph as image anywhere or it is runtime implementation ?
Please help to know how to send these performance trend graph as email
I am not able to find any direct approach. So, I have tried the below:-
Create one project with the below:-
a. Build - execute the jmx for performance
b. Post build action:- This one is to Publish performance test result report. In the same post build step, I have add one more i.e. Build other project and give name of the 2nd project(Send Reports) which is taking the snapshot and triggering the mail
Create 2nd project (Send Reports) with the below:-
a. Build - execute the snapshot script.
b. Post build action:-Send email with the snapshot generated in step a.
Snapshot below for capturing the performance trend:-
Code:-
// Importing packages (and all classes in package) from Java into Javascript
var pkg = JavaImporter(org.openqa.selenium)
var support_ui = JavaImporter(org.openqa.selenium.support.ui.WebDriverWait)
var fileUtils = JavaImporter(org.apache.commons.io.FileUtils)
var timeunit = java.util.concurrent.TimeUnit
//Login
WDS.browser.get("http://localhost:8080/")
var username = WDS.browser.findElement(pkg.By.id('j_username')).sendKeys(['Your_Username']);
var password = WDS.browser.findElement(pkg.By.name('j_password')).sendKeys(['Your_passowrd']);
var LogInBtn = WDS.browser.findElement(pkg.By.name('Submit')).click();
//Navigation
var ProjectLink = WDS.browser.findElement(pkg.By.linkText('Test_FreestyleProject')).click();
var PerformanceTrend = WDS.browser.findElement(pkg.By.linkText('Performance Trend')).click();
//Screenshot
var screenshot = WDS.browser.getScreenshotAs(pkg.OutputType.FILE)
screenshot.renameTo(new java.io.File("D:/pathtosnapshot/workspace/SendReport/" + "Performance_Report.png" ))
Once it is setup, first project will trigger the second project on completion and second project will take the snapshot and send the email. Now, you need to check your navigation in your project and modify the script according to your requirements like for timestamp, build identification etc.
I have check all the above except for the mail triggering part. I am getting success for the email and no error in the output log, but the mail is not triggering. It may be SMTP configuration or something else.
Hope this helps.
I have tried creating an adaptive card, parsing it from json. As mentioned in https://learn.microsoft.com/en-us/adaptive-cards/create/libraries/net#example-parse-from-json, I have installed AdaptiveCards package and tried using that function, but it throws a error like 'AdaptiveCard' does not contain a definition for 'FromJson'.
As there is a Breaking changes from v0.5:
Package renamed from Microsoft.AdaptiveCards to AdaptiveCards
It seems that you have installed Microsoft.AdaptiveCards but AdaptiveCards.
To install AdaptiveCards, please mark Include prerelease checkbox in NuGet package manager:
Apparently the documentation is outdated. The class is named AdaptiveCard now, without the last 's'.
So instead of:
var parseResult = AdaptiveCards.FromJson(card);
Use:
var parseResult = AdaptiveCard.FromJson(card);
I've got an MVC4/WebApi project that I'm trying to wire up with Ninject 3. I would like to share a particular object across a number of entities within request scope, however I understand that I need to provide some sort of implementation of InRequestScope (https://stackoverflow.com/a/10592203/173225). I've looked at the source on GitHub and it appears to simply return HttpContext.Current. I've tried that:
var messages = new List<string>();
kernel.Bind<IList<string>>()
.ToMethod(x => messages)
.WhenMemberHas<ServiceResultMessagesAttribute>()
.InScope(x => HttpContext.Current);
with no luck. I've also tried to use the latest "unstable" Nuget package for Ninject.Web.WebApi (#9018) as recommended in https://groups.google.com/d/msg/ninject/rC2vhj8yvBU/NAIkNA-QrAAJ, but I get the same error (method get_InRequestScope does not have an implementation).
As for the source on GitHub, at the time of writing the last update to the relevant files was 11 months to more than a year ago, so I don't know if that is current with the unstable Nuget package or not (especially given the state of documentation for Ninject).
Can anyone provide a proper working example of how to inject the same instance of an object across more than one component within request scope?
Thanks.
You will need Ninject.Web.Common reference from nuget or elsewhere and use the InRequestScope method.
var messages = new List<string>();
kernel.Bind<IList<string>>()
.ToMethod(x => messages)
.WhenMemberHas<ServiceResultMessagesAttribute>()
.InRequestScope();
Is there a Joomla 2.5.x API that would allow for retrieval of a plugin information(i.e. parameters) if the desired plugin is unpublished?
Why: We have a few plugins that are only enabled in production and I'm looking for a way to get at some of the parameters programmatically and without querying the database directly.
Try something like
$userPlugin = JPluginHelper::getPlugin('user', 'joomla'); // group, specific - optional
$userPluginParams = new JRegistry();
$userPluginParams->loadString($userPlugin->params); //get the string as a jregistry
$useStrongEncryption = $userPluginParams->get('strong_passwords', 0); // get the one you want.
Here's a workaround to make it not run but still able to get:
Okay how about this for a trick/workaround. Did you realize plugins have access levels? Why don't you create an access level with no one in it and assign to the plugin as the only level it runs for. Then you can publish it but it won't run.
Is there a way to retrieve comment message of teamcity build during its run.
From the wiki from Teamcity noticed there are ways to reach & retrieve server build / agent build properties : http://confluence.jetbrains.com/display/TCD7/Predefined+Build+Parameters
I would like to know, if there exists a solution to retrieve comment message string from the build. If few are present under pending changes, then it has to retrieve it with some line separator.
With system properties, if we define/add new property in the build in what format it gets retrieved when we somehow parse : teamcity.build.properties.file
Thanks,
In order to retrieve comments of a build you can use TeamCity REST API:
http://teamcity.codebetter.com/guestAuth/app/rest/changes?locator=build:id:216886&fields=change(id,version,href,username,date,webUrl,comment)
If you need it from C# project, you may consider using FluentTc library:
IBuild build = new RemoteTc()
.Connect(_ => _.ToHost("teamcity.codebetter.com").AsGuest())
.GetLastBuild(
having => having.Id(216886),
with => with.IncludeChanges(and => and.IncludeComment()));