Skip to content

Instantly share code, notes, and snippets.

View maestrotex's full-sized avatar

Sanjay Prakash Pradhan maestrotex

View GitHub Profile
<html><head>
<meta charset="utf-8">
<title>Error</title>
<script type="text/javascript" src="../ClientGlobalContext.js.aspx"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style type="text/css">
.footer {
position: fixed;
var CourseForm = (function () {
var SaveMode = {
Save: 1,
SaveAndClose: 2,
SaveAndNew: 59,
Autosave: 70
};
//Variable that shows if validation was successfully passed or not
<html><head><meta></head><body onfocusout="parent.setEmailRange();">
<script src="../WebResources/ClientGlobalContext.js.aspx" type="text/javascript"></script>
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="https://cdn.datatables.net/1.11.5/css/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="//cdn.datatables.net/1.11.5/css/jquery.dataTables.min.css" rel="stylesheet" type="text/css">
function ShowRelatedContacts(primaryControl)
{
var formContext = primaryControl;
var accountID = formContext.data.entity.getId();
var webresourceName = "crcfa_contactsws.html";
var windowOptions = { height: 600, width: 700 };
Xrm.Navigation.openWebResource(webresourceName, windowOptions, accountID);
}
<html><head><meta></head><body onfocusout="parent.setEmailRange();">
<script src="../WebResources/ClientGlobalContext.js.aspx" type="text/javascript"></script>
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="https://cdn.datatables.net/1.11.5/css/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="//cdn.datatables.net/1.11.5/css/jquery.dataTables.min.css" rel="stylesheet" type="text/css">
function callFlow(executionContext)
{
var formContext = executionContext.getFormContext();
var accountName = formContext.getAttribute("name").getValue();
var email = formContext.getAttribute("emailaddress1").getValue();
var params = {
"Name":accountName,
"Email":email
}
@maestrotex
maestrotex / thirdpartywebapicall.cs
Created December 18, 2021 09:05
call thirdparty web api from plugin dynamics 365 ce powerapps
using Microsoft.Xrm.Sdk;
using Newtonsoft.Json.Linq;
using System;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Xml;
namespace Thirdpartycallpluginconfig
{
//Call Global Custom Action from Javascript using Web API
function CallCustomActionFromJavaScript() {
//get the current organization url
var globalContext = Xrm.Utility.getGlobalContext();
var serverURL = globalContext.getClientUrl();
//query to send the request to the global Action
// Global Action Unique Name - this name is Case Sensitive
var actionName = "soft_MyCustomAction";
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xrm.Sdk;
namespace Sample_Plugin
{
public class CustomActionCall : IPlugin
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
$targetNugetExe = ".\nuget.exe"
Remove-Item .\Tools -Force -Recurse -ErrorAction Ignore
Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe
Set-Alias nuget $targetNugetExe -Scope Global -Verbose
##
##Download Plug-in Registration tool
##