Skip to content

Commit

Permalink
Merge pull request #80 from microsoft/Nava_samplecode
Browse files Browse the repository at this point in the history
Nava samplecode
  • Loading branch information
Nkrb authored Jan 13, 2020
2 parents 6431151 + f57c907 commit 4260679
Show file tree
Hide file tree
Showing 207 changed files with 3,092,594 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<OutputType>Exe</OutputType>
<RootNamespace>ActivityPartyRecords</RootNamespace>
<AssemblyName>ActivityPartyRecords</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -119,6 +120,7 @@
</Page>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<OutputType>Exe</OutputType>
<RootNamespace>AddSecurityPrincipalToQueue</RootNamespace>
<AssemblyName>AddSecurityPrincipalToQueue</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
31 changes: 31 additions & 0 deletions cds/orgsvc/C#/AssignRecordToNewOwner/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Assign a record to a new owner

This sample shows how to assign an account to another user by using the [IOrganizationService.Update](https://docs.microsoft.com/dotnet/api/microsoft.xrm.sdk.iorganizationservice.update?view=dynamics-general-ce-9) message.

This sample uses the `IOrganization.Update` method rather than the [AssignRequest](https://docs.microsoft.com/dotnet/api/microsoft.crm.sdk.messages.assignrequest?view=dynamics-general-ce-9) because there is an effort to remove specialized messages. More information: [Perform specialized operations using update](https://docs.microsoft.com/powerapps/developer/common-data-service/special-update-operation-behavior)

## How to run this sample

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

## What this sample does

The [IOrganizationService.Update](https://docs.microsoft.com/dotnet/api/microsoft.xrm.sdk.iorganizationservice.update?view=dynamics-general-ce-9) message is intended to be used in a scenario where it contains the data that is needed to update existing record.

## How this sample works

In order to simulate the scenario described in [What this sample does](#what-this-sample-does), the sample will do the following:

### Setup

1. Checks for the current version of the org.
1. Creates required data that this sample requires.

### Demonstrate

1. The `Retrieve` method retrieves the account records created in the setup(#setup).
1. The `Update` message updates the `ownerid` attribute to the user who you want to own the record.

### Clean up

Displays an option to delete all the data created in the sample. The deletion is optional in case you want to examine the data created by the sample. You can manually delete the data to achieve same results.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29509.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssociateSecurityRoleToUser", "AssociateSecurityRoleToUser\AssociateSecurityRoleToUser.csproj", "{2273D173-5C7D-41B0-B0FB-B0979E9AF0FC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2273D173-5C7D-41B0-B0FB-B0979E9AF0FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2273D173-5C7D-41B0-B0FB-B0979E9AF0FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2273D173-5C7D-41B0-B0FB-B0979E9AF0FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2273D173-5C7D-41B0-B0FB-B0979E9AF0FC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9A9C0B71-3EE2-4978-AEDA-9C7057C9B4EB}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
<?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; [email protected]; 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-Sample-Log" Location="LocalUserApplicationDirectory" MaxFileSize="52428800" />

<!--
fileListener Log written to
\\{Computer Name}\Users\{UserName}\AppData\Roaming\PowerApps\{Sample Project Name}\1.0.0.0\PowerApps-Sample-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-Sample-Log-ADAL"
Location="LocalUserApplicationDirectory"
MaxFileSize="52428800"/>-->

<!--
ADALListener Log written to
\\{Computer Name}\Users\{UserName}\AppData\Roaming\PowerApps\{Sample Project Name}\1.0.0.0\PowerApps-Sample-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="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" publicKeyToken="31bf3856ad364e35" culture="neutral" />

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

</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 4260679

Please sign in to comment.