Skip to content

Commit

Permalink
Merge pull request #78 from microsoft/Nava_samplecode
Browse files Browse the repository at this point in the history
Adding more samples
  • Loading branch information
Nkrb authored Dec 30, 2019
2 parents c15fc6b + c2898b7 commit 076f861
Show file tree
Hide file tree
Showing 200 changed files with 1,664,294 additions and 1,163 deletions.
6 changes: 2 additions & 4 deletions cds/orgsvc/C#/ActivityPartyRecords/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ In order to simulate the scenario described in [What this sample does](#what-thi

### Setup

1. Creates three contact records which are required for this sample.
Creates three contact records which are required for this sample.

### Demonstrate

Expand All @@ -27,6 +27,4 @@ In order to simulate the scenario described in [What this sample does](#what-thi

### Clean up

1. Display an option to delete the records created during [Setup](#setup).

The deletion is optional in case you want to examine the entities and data created by the sample. You can manually delete the records to achieve the same result.
Display an option to delete the records created during [Setup](#setup). The deletion is optional in case you want to examine the entities and data created by the sample. You can manually delete the records to achieve the same result.
10 changes: 4 additions & 6 deletions cds/orgsvc/C#/AddSecurityPrincipalToQueue/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Add a security principal (user or team) to a queue (early bound)

This sample shows how to give a user or team access to a queue. The [AddPrincipalToQueueRequest](https://docs.microsoft.com/en-us/dotnet/api/microsoft.crm.sdk.messages.addprincipaltoqueuerequest?view=dynamics-general-ce-9) adds the specified principal to the list of queue members. If the passed-in security principal is a team each member of the team is added to the queue.
This sample shows how to give a user or team access to a queue. The [AddPrincipalToQueueRequest](https://docs.microsoft.com/dotnet/api/microsoft.crm.sdk.messages.addprincipaltoqueuerequest?view=dynamics-general-ce-9) adds the specified principal to the list of queue members. If the passed-in security principal is a team each member of the team is added to the queue.

## How to run this sample

See [How to run samples](https://github.com/microsoft/PowerApps-Samples/blob/master/cds/README.md) for information about how to run this sample.

## What this sample does

The [AddPrincipalToQueueRequest](https://docs.microsoft.com/en-us/dotnet/api/microsoft.crm.sdk.messages.addprincipaltoqueuerequest?view=dynamics-general-ce-9) message is intended to be used in a scenario where it contains data that is needed to add the specified principal to the list of queue members. If the principal is a team, add each team member to the queue.
The [AddPrincipalToQueueRequest](https://docs.microsoft.com/dotnet/api/microsoft.crm.sdk.messages.addprincipaltoqueuerequest?view=dynamics-general-ce-9) message is intended to be used in a scenario where it contains data that is needed to add the specified principal to the list of queue members. If the principal is a team, add each team member to the queue.

## How this sample works

Expand All @@ -25,10 +25,8 @@ In order to simulate the scenario described in [What this sample does](#what-thi

### Demonstrate

1. The `AddPrincipalToQueueRequest` method adds the team to the queue.
The `AddPrincipalToQueueRequest` method adds the team to the queue.

### Clean up

1. Display an option to delete the sample data in [Setup](#setup).

The deletion is optional in case you want to examine the entities and data created by the sample. You can manually delete the records to achieve the same result.
Display an option to delete the sample data in [Setup](#setup). The deletion is optional in case you want to examine the entities and data created by the sample. You can manually delete the records to achieve the same result.
10 changes: 4 additions & 6 deletions cds/orgsvc/C#/AssignChartToAnotherUser/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Assign a chart to another user

This sample shows how to assign a user-owned visualization to another using the [AssignRequest](https://docs.microsoft.com/en-us/dotnet/api/microsoft.crm.sdk.messages.assignrequest?view=dynamics-general-ce-9) message.
This sample shows how to assign a user-owned visualization to another using the [AssignRequest](https://docs.microsoft.com/dotnet/api/microsoft.crm.sdk.messages.assignrequest?view=dynamics-general-ce-9) message.

This sample requires an additional user that isn't available in your system. Create the required user manually in **Office 365** in order to run the sample without any errors. For this sample create a user profile **as is** shown below.

Expand All @@ -15,7 +15,7 @@ See [How to run samples](https://github.com/microsoft/PowerApps-Samples/blob/mas

## What this sample does

The [AssignRequest](https://docs.microsoft.com/en-us/dotnet/api/microsoft.crm.sdk.messages.assignrequest?view=dynamics-general-ce-9) message is intended to be used in a scenario where it contains the data that is needed to assign the specified record to a new owner (user or team) by changing the OwnerId attribute of the record.
The [AssignRequest](https://docs.microsoft.com/dotnet/api/microsoft.crm.sdk.messages.assignrequest?view=dynamics-general-ce-9) message is intended to be used in a scenario where it contains the data that is needed to assign the specified record to a new owner (user or team) by changing the OwnerId attribute of the record.

## How this sample works

Expand All @@ -29,10 +29,8 @@ In order to simulate the scenario described in [What this sample does](#what-thi

### Demonstrate

1. The `AssignRequest` method assigns the visualization or chart to the newly created user.
The `AssignRequest` method assigns the visualization or chart to the newly created user.

### Clean up

1. Display an option to delete the sample data in [Setup](#setup).

The deletion is optional in case you want to examine the entities and data created by the sample. You can manually delete the records to achieve the same result.
Display an option to delete the sample data in [Setup](#setup). The deletion is optional in case you want to examine the entities and data created by the sample. You can manually delete the records to achieve the same result.
22 changes: 22 additions & 0 deletions cds/orgsvc/C#/AssignRecordToNewOwner/AssignRecordToNewOwner.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.9
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssignRecordToNewOwner", "AssignRecordToNewOwner\AssignRecordToNewOwner.csproj", "{96B7FE29-A5C3-4270-BD2B-0A6BA6E820F5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{96B7FE29-A5C3-4270-BD2B-0A6BA6E820F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{96B7FE29-A5C3-4270-BD2B-0A6BA6E820F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96B7FE29-A5C3-4270-BD2B-0A6BA6E820F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{96B7FE29-A5C3-4270-BD2B-0A6BA6E820F5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
209 changes: 209 additions & 0 deletions cds/orgsvc/C#/AssignRecordToNewOwner/AssignRecordToNewOwner/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>

<connectionStrings>
<!-- To run all samples without being prompted for login credentials, un-comment and edit one of the example
connection strings below using appropriate values for your environment. Otherwise, you will be prompted for
login information when you run a sample project.
Use the system.diagnostics/switches keys below to control levels of logging. -->

<!-- ** !IMPORTANT! **
Be mindful that the connection information you enter in these will be available to anyone with access to this
file. Do not push changes to this file to a cloned GitHub repository. -->

<!--Online using Office 365-->
<!--<add name="Connect" connectionString="Url=https://yourorgname.crm.dynamics.com;
Username=you@yourorg.onmicrosoft.com; Password=password; authtype=Office365; RequireNewInstance=True"/>-->
</connectionStrings>


<system.diagnostics>
<trace autoflush="true" />
<sources>

<source name="Microsoft.Xrm.Tooling.Connector.CrmServiceClient" switchName="Microsoft.Xrm.Tooling.Connector.CrmServiceClient" switchType="System.Diagnostics.SourceSwitch">

<listeners>

<add name="console" type="System.Diagnostics.ConsoleTraceListener" />

<add name="fileListener" />

</listeners>

</source>

<source name="Microsoft.Xrm.Tooling.CrmConnectControl" switchName="Microsoft.Xrm.Tooling.CrmConnectControl" switchType="System.Diagnostics.SourceSwitch">

<listeners>

<add name="console" type="System.Diagnostics.ConsoleTraceListener" />

<add name="fileListener" />

</listeners>

</source>

<!--ADALListener conflicts with using ADAL libraries directly without the Xrm.Tooling.Connector assemblies.
Uncomment this if you are using the Xrm.Tooling.Connector-->

<!--<source name="Microsoft.IdentityModel.Clients.ActiveDirectory" switchName="Microsoft.IdentityModel.Clients.ActiveDirectory" switchType="System.Diagnostics.SourceSwitch">
<listeners>
<add name="console" type="System.Diagnostics.ConsoleTraceListener"/>
<remove name="Default"/>
<add name="ADALListener"/>
</listeners>
</source>-->

</sources>

<switches>

<!--
Possible values for switches: Off, Error, Warning, Info, Verbose
All" includes Error, Warning, Info, Verbose, Activity Tracing Trace levels
ActivityTracing: Just Activity Tracing
Verbose: includes Error, Warning, Info, Trace levels
Info: includes Error, Warning, Info levels
Warning: includes Error, Warning levels
Error: includes Error level
-->

<add name="Microsoft.Xrm.Tooling.Connector.CrmServiceClient" value="Error" />

<add name="Microsoft.Xrm.Tooling.CrmConnectControl" value="Error" />

<add name="Microsoft.IdentityModel.Clients.ActiveDirectory" value="Error" />

</switches>

<sharedListeners>
<add name="fileListener" type="Microsoft.Xrm.Tooling.Connector.DynamicsFileLogTraceListener, Microsoft.Xrm.Tooling.Connector" />

<add name="fileListener" type="Microsoft.Xrm.Tooling.Connector.DynamicsFileLogTraceListener, Microsoft.Xrm.Tooling.Connector" BaseFileName="PowerApps_Sample1-Log" Location="LocalUserApplicationDirectory" MaxFileSize="52428800" />

<!--
fileListener Log written to
\\{Computer Name}\Users\{UserName}\AppData\Roaming\PowerApps\PowerApps_Sample1\1.0.0.0\PowerApps_Sample1-Log-{YYYY}-{MM}-{DD}.log
-->

<!--ADALListener conflicts with using ADAL libraries directly without the Xrm.Tooling.Connector assemblies.
Uncomment this if you are using the Xrm.Tooling.Connector-->

<!--<add name="ADALListener"
type="Microsoft.Xrm.Tooling.Connector.DynamicsFileLogTraceListener, Microsoft.Xrm.Tooling.Connector"
BaseFileName="PowerApps_Sample1-Log-ADAL"
Location="LocalUserApplicationDirectory"
MaxFileSize="52428800"/>-->

<!--
ADALListener Log written to
\\{Computer Name}\Users\{UserName}\AppData\Roaming\PowerApps\PowerApps_Sample1\1.0.0.0\PowerApps_Sample1-Log-ADAL-{YYYY}-{MM}-{DD}.log
-->

</sharedListeners>

</system.diagnostics>



<startup>

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />

</startup>

<runtime>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<dependentAssembly>

<assemblyIdentity name="Microsoft.Xrm.Sdk" publicKeyToken="31bf3856ad364e35" culture="neutral" />

<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />

</dependentAssembly>

<dependentAssembly>

<assemblyIdentity name="Microsoft.Xrm.Sdk.Workflow" publicKeyToken="31bf3856ad364e35" culture="neutral" />

<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />

</dependentAssembly>

<dependentAssembly>

<assemblyIdentity name="Microsoft.Xrm.Tooling.Connector" publicKeyToken="31bf3856ad364e35" culture="neutral" />

<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />

</dependentAssembly>

<dependentAssembly>

<assemblyIdentity name="Microsoft.Crm.Sdk.Proxy" publicKeyToken="31bf3856ad364e35" culture="neutral" />

<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />

</dependentAssembly>

<dependentAssembly>

<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />

<bindingRedirect oldVersion="0.0.0.0-2.29.0.1078" newVersion="2.29.0.1078" />

</dependentAssembly>

<dependentAssembly>

<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />

<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />

</dependentAssembly>

<dependentAssembly>

<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms" publicKeyToken="31bf3856ad364e35" culture="neutral" />

<bindingRedirect oldVersion="0.0.0.0-2.29.0.1078" newVersion="2.29.0.1078" />

</dependentAssembly>

</assemblyBinding>

</runtime>

</configuration>

Loading

0 comments on commit 076f861

Please sign in to comment.