├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── XrmOrg
├── XrmFramework.snk
└── XrmOrg.XrmSolution
│ ├── .nuget
│ ├── NuGet.Config
│ └── packages.config
│ ├── BusinessDomain
│ ├── BusinessDomain.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── XrmContext.cs
│ ├── XrmExtensions.cs
│ └── packages.config
│ ├── BusinessLogic
│ ├── BusinessException.cs
│ ├── BusinessLogic.csproj
│ ├── Helpers
│ │ ├── HelperBusinessDomain.cs
│ │ ├── HelperPlugin.cs
│ │ └── HelperUtils.cs
│ ├── ManagerAccount.cs
│ ├── ManagerBase.cs
│ ├── ManagerContact.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── app.config
│ └── packages.config
│ ├── ConsoleJobs
│ ├── App.config
│ ├── ConsoleJobs.csproj
│ ├── Containers
│ │ └── CsvContainer.cs
│ ├── Helpers
│ │ └── ListExtension.cs
│ ├── Jobs
│ │ ├── ExampleInvokeManagerJob.cs
│ │ ├── ExampleJob.cs
│ │ ├── ExampleReadFromCsvJob.cs
│ │ ├── ExampleWriteToCsvJob.cs
│ │ └── IJob.cs
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── README.md
│ ├── Setup
│ │ ├── EnvironmentConfig.cs
│ │ └── Logger.cs
│ └── packages.config
│ ├── Plugins
│ ├── AccountPostPlugin.cs
│ ├── Plugin.cs
│ ├── Plugins.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── app.config
│ └── packages.config
│ ├── Tests
│ ├── Metadata
│ │ ├── Metadata.xml
│ │ ├── MetadataGenerator365.exe
│ │ ├── MetadataGenerator365.exe.config
│ │ ├── SecurityRoles
│ │ │ ├── AIBRoles.xml
│ │ │ ├── ActivityFeeds.xml
│ │ │ ├── AnotherName.xml
│ │ │ ├── AppProfileManagerAdministrator.xml
│ │ │ ├── AppProfileUser.xml
│ │ │ ├── BasicUser.xml
│ │ │ ├── BizQAApp.xml
│ │ │ ├── BotAuthor.xml
│ │ │ ├── BotContributor.xml
│ │ │ ├── BotTranscriptViewer.xml
│ │ │ ├── BusinessApplicationPlatformRole.xml
│ │ │ ├── CCIadmin.xml
│ │ │ ├── CEOBusinessManager.xml
│ │ │ ├── CSRManager.xml
│ │ │ ├── Cannotcreatecontact.xml
│ │ │ ├── Cannotreadcontact.xml
│ │ │ ├── CustomerServiceRepresentative.xml
│ │ │ ├── CustomerVoiceAddon.xml
│ │ │ ├── Customerserviceappaccess.xml
│ │ │ ├── DataLakeWorkspaceAppAccess.xml
│ │ │ ├── Delegate.xml
│ │ │ ├── Differentname.xml
│ │ │ ├── Dynamics365AppforOutlookUser.xml
│ │ │ ├── EACAppAccess.xml
│ │ │ ├── EACReaderAppAccess.xml
│ │ │ ├── EniroUser.xml
│ │ │ ├── EnvironmentMaker.xml
│ │ │ ├── ExportCustomizationsSolutionChecker.xml
│ │ │ ├── FieldServiceAdministrator.xml
│ │ │ ├── FieldServiceDispatcher.xml
│ │ │ ├── FieldServiceInventoryPurchase.xml
│ │ │ ├── FieldServiceResource.xml
│ │ │ ├── FieldServiceSalesperson.xml
│ │ │ ├── FileStoreServiceAppAccess.xml
│ │ │ ├── ForecastAppUser.xml
│ │ │ ├── Forecastmanager.xml
│ │ │ ├── Forecastuser.xml
│ │ │ ├── GlobalDiscoveryServiceRole.xml
│ │ │ ├── HelpPageAuthor.xml
│ │ │ ├── HelpPageConsumer.xml
│ │ │ ├── IoTAdministrator.xml
│ │ │ ├── IoTEndpointUser.xml
│ │ │ ├── KnowledgeManager.xml
│ │ │ ├── MarketingManager.xml
│ │ │ ├── MarketingProfessional.xml
│ │ │ ├── Orchestrator.xml
│ │ │ ├── PlaybookManager.xml
│ │ │ ├── PlaybookUser.xml
│ │ │ ├── Productivitytoolsadministrator.xml
│ │ │ ├── Productivitytoolsuser.xml
│ │ │ ├── ProjectOwner.xml
│ │ │ ├── RelationshipInsightsAdmin.xml
│ │ │ ├── SalesInsightsAutoCaptureAdmin.xml
│ │ │ ├── SalesManager.xml
│ │ │ ├── SalesTeamMember.xml
│ │ │ ├── Salesperson.xml
│ │ │ ├── Salessystemaccess.xml
│ │ │ ├── Salessystemaccessextension.xml
│ │ │ ├── Samename.xml
│ │ │ ├── ScheduleManager.xml
│ │ │ ├── Scheduler.xml
│ │ │ ├── SequenceManager.xml
│ │ │ ├── ServiceReader.xml
│ │ │ ├── ServiceWriter.xml
│ │ │ ├── SolutionChecker.xml
│ │ │ ├── SupportUser.xml
│ │ │ ├── SurveyServicesAdministrator.xml
│ │ │ ├── SystemAdministrator.xml
│ │ │ ├── SystemCustomizer.xml
│ │ │ ├── TestofXrmMockup.xml
│ │ │ ├── TimeEntryUser.xml
│ │ │ ├── VicePresidentofMarketing.xml
│ │ │ ├── VicePresidentofSales.xml
│ │ │ ├── _000TestingRole.xml
│ │ │ └── createRef.xml
│ │ ├── TypeDeclarations.cs
│ │ └── Workflows
│ │ │ ├── ActionTest.xml
│ │ │ └── WaitingWorkflow.xml
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── TestBase.cs
│ ├── TestExample.cs
│ ├── Tests.csproj
│ ├── app.config
│ └── packages.config
│ ├── Tools
│ ├── CustomScripting
│ │ ├── AssignRecords.fsx
│ │ ├── CountRecords.fsx
│ │ ├── CreateOrgReportViews.fsx
│ │ ├── DeactiveViews.fsx
│ │ ├── FindDuplicates.fsx
│ │ ├── Helper
│ │ │ ├── CrmDataHelper.fsx
│ │ │ ├── DeployHelper.Main.fsx
│ │ │ └── DeployHelper.Playground.fsx
│ │ ├── MissingDocumentLocation.fsx
│ │ ├── RetrieveMultipleBulk.fsx
│ │ ├── SetCurrencyIfMissing.fsx
│ │ ├── SetState.fsx
│ │ ├── SimpleSolutionExportImport.fsx
│ │ └── TouchNames.fsx
│ ├── Daxif
│ │ ├── CountEntities.fsx
│ │ ├── DataExportSource.fsx
│ │ ├── DataImportTarget.fsx
│ │ ├── GenerateCSharpContext.fsx
│ │ ├── GenerateTypeScriptContext.fsx
│ │ ├── Playground.fsx
│ │ ├── PluginSyncDev.fsx
│ │ ├── PublishAllArg.fsx
│ │ ├── SolutionCreateDev.fsx
│ │ ├── SolutionExportDev.fsx
│ │ ├── SolutionExtract.fsx
│ │ ├── SolutionImportArg.fsx
│ │ ├── SolutionPack.fsx
│ │ ├── ViewExtender.fsx
│ │ ├── WebResourceSyncDev.fsx
│ │ ├── WorkflowSyncDev.fsx
│ │ ├── _Config.fsx
│ │ └── bin
│ │ │ ├── Delegate.Daxif.dll
│ │ │ ├── Delegate.Daxif.xml
│ │ │ ├── FSharp.Core.dll
│ │ │ ├── Microsoft.ApplicationInsights.dll
│ │ │ ├── Microsoft.Crm.Sdk.Proxy.dll
│ │ │ ├── Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll
│ │ │ ├── Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
│ │ │ ├── Microsoft.IdentityModel.Clients.ActiveDirectory.dll
│ │ │ ├── Microsoft.IdentityModel.dll
│ │ │ ├── Microsoft.PowerApps.AppInsights.BatchedTelemetry.dll
│ │ │ ├── Microsoft.PowerApps.AppInsights.BatchedTelemetryChannel.dll
│ │ │ ├── Microsoft.Rest.ClientRuntime.dll
│ │ │ ├── Microsoft.Xrm.Sdk.Deployment.dll
│ │ │ ├── Microsoft.Xrm.Sdk.Workflow.dll
│ │ │ ├── Microsoft.Xrm.Sdk.Workflow.xml
│ │ │ ├── Microsoft.Xrm.Sdk.dll
│ │ │ ├── Microsoft.Xrm.Tooling.Connector.dll
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ ├── Newtonsoft.Json.xml
│ │ │ ├── SolutionPackagerLib.dll
│ │ │ ├── System.Diagnostics.DiagnosticSource.dll
│ │ │ └── System.ValueTuple.dll
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ └── Plugin.cs
│ ├── Tools.csproj
│ ├── XrmContext
│ │ ├── FSharp.Core.dll
│ │ ├── Microsoft.Crm.Sdk.Proxy.dll
│ │ ├── Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll
│ │ ├── Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
│ │ ├── Microsoft.IdentityModel.Clients.ActiveDirectory.dll
│ │ ├── Microsoft.Rest.ClientRuntime.dll
│ │ ├── Microsoft.Xrm.Sdk.Deployment.dll
│ │ ├── Microsoft.Xrm.Sdk.Workflow.dll
│ │ ├── Microsoft.Xrm.Sdk.dll
│ │ ├── Microsoft.Xrm.Tooling.Connector.dll
│ │ ├── Newtonsoft.Json.dll
│ │ ├── Run.fsx
│ │ ├── Run.ps1
│ │ ├── System.ValueTuple.dll
│ │ ├── XrmContext.exe
│ │ ├── XrmContext.exe.config
│ │ └── XrmContext.xml
│ ├── XrmDefinitelyTyped
│ │ ├── FSharp.Core.dll
│ │ ├── Microsoft.Crm.Sdk.Proxy.dll
│ │ ├── Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll
│ │ ├── Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
│ │ ├── Microsoft.IdentityModel.Clients.ActiveDirectory.dll
│ │ ├── Microsoft.Rest.ClientRuntime.dll
│ │ ├── Microsoft.Xrm.Sdk.Deployment.dll
│ │ ├── Microsoft.Xrm.Sdk.Workflow.dll
│ │ ├── Microsoft.Xrm.Sdk.dll
│ │ ├── Microsoft.Xrm.Tooling.Connector.dll
│ │ ├── Newtonsoft.Json.dll
│ │ ├── Run.fsx
│ │ ├── Run.ps1
│ │ ├── System.ValueTuple.dll
│ │ ├── XrmDefinitelyTyped.exe
│ │ ├── XrmDefinitelyTyped.exe.config
│ │ └── XrmDefinitelyTyped.xml
│ ├── app.config
│ └── packages.config
│ ├── WebResources
│ ├── .eslintrc.js
│ ├── WebResources.csproj
│ ├── packages.config
│ ├── src
│ │ └── dg_XrmSolution
│ │ │ ├── .gitignore
│ │ │ ├── dg.account.ts
│ │ │ └── lib
│ │ │ ├── dg.xrmquery.web.js
│ │ │ ├── dg.xrmquery.web.min.js
│ │ │ ├── dg.xrmquery.web.promise.min.js
│ │ │ ├── jquery
│ │ │ └── 1.11.3
│ │ │ │ └── jquery.min.js
│ │ │ ├── misc
│ │ │ ├── misc.json2.js
│ │ │ └── misc.uuid.js
│ │ │ └── sdk
│ │ │ ├── 2011
│ │ │ ├── sdk.dependentoptionset.js
│ │ │ ├── sdk.jquery.js
│ │ │ ├── sdk.metadata.js
│ │ │ ├── sdk.rest.js
│ │ │ └── sdk.soap.assign.js
│ │ │ ├── 2013
│ │ │ ├── sdk.dependentoptionset.js
│ │ │ ├── sdk.duplicatedetection.js
│ │ │ ├── sdk.jquery.js
│ │ │ ├── sdk.metadata.js
│ │ │ ├── sdk.rest.js
│ │ │ └── sdk.soap.assign.js
│ │ │ ├── 2015
│ │ │ ├── sdk.dependentoptionset.js
│ │ │ ├── sdk.duplicatedetection.js
│ │ │ ├── sdk.jquery.js
│ │ │ ├── sdk.metadata.js
│ │ │ ├── sdk.rest.js
│ │ │ └── sdk.soap.assign.js
│ │ │ └── 2016
│ │ │ ├── sdk.jquery.js
│ │ │ ├── sdk.metadata.js
│ │ │ ├── sdk.rest.js
│ │ │ └── sdk.soap.assign.js
│ ├── tsconfig.json
│ ├── typings
│ │ ├── XRM
│ │ │ ├── Form
│ │ │ │ ├── account
│ │ │ │ │ ├── InteractionCentricDashboard
│ │ │ │ │ │ └── AccountsDashboard.d.ts
│ │ │ │ │ ├── Main
│ │ │ │ │ │ ├── AccountMobile.d.ts
│ │ │ │ │ │ ├── AccountforInteractiveexperience.d.ts
│ │ │ │ │ │ ├── AccountforMultisessionexperience.d.ts
│ │ │ │ │ │ ├── Information.d.ts
│ │ │ │ │ │ └── SalesInsights.d.ts
│ │ │ │ │ ├── Quick
│ │ │ │ │ │ ├── AccountHierarchyTileForm.d.ts
│ │ │ │ │ │ ├── AccountReferencePanel.d.ts
│ │ │ │ │ │ ├── AccountSummaryCard.d.ts
│ │ │ │ │ │ ├── AppforOutlookAccountCard.d.ts
│ │ │ │ │ │ ├── AppforOutlookAccountQuickView.d.ts
│ │ │ │ │ │ ├── Information.d.ts
│ │ │ │ │ │ ├── RecentCasesandEntitlements.d.ts
│ │ │ │ │ │ ├── SocialProfiles.d.ts
│ │ │ │ │ │ └── accountcard.d.ts
│ │ │ │ │ └── QuickCreate
│ │ │ │ │ │ ├── AccountQuickCreate.d.ts
│ │ │ │ │ │ ├── Information.d.ts
│ │ │ │ │ │ └── Information1.d.ts
│ │ │ │ ├── connection
│ │ │ │ │ └── Main
│ │ │ │ │ │ └── Information.d.ts
│ │ │ │ ├── contact
│ │ │ │ │ ├── InteractionCentricDashboard
│ │ │ │ │ │ └── ContactsDashboard.d.ts
│ │ │ │ │ ├── Main
│ │ │ │ │ │ ├── Contact.d.ts
│ │ │ │ │ │ ├── ContactMobile.d.ts
│ │ │ │ │ │ ├── ContactforMultisessionexperience.d.ts
│ │ │ │ │ │ └── SalesInsights.d.ts
│ │ │ │ │ ├── Quick
│ │ │ │ │ │ ├── AppforOutlookContactCard.d.ts
│ │ │ │ │ │ ├── AppforOutlookContactQuickView.d.ts
│ │ │ │ │ │ ├── ContactQuickForm.d.ts
│ │ │ │ │ │ ├── ContactReferencePanel.d.ts
│ │ │ │ │ │ ├── LivePersonaCardForm.d.ts
│ │ │ │ │ │ ├── RecentCasesandEntitlements.d.ts
│ │ │ │ │ │ ├── SocialProfiles.d.ts
│ │ │ │ │ │ ├── accountcontactcard.d.ts
│ │ │ │ │ │ └── contactcard.d.ts
│ │ │ │ │ ├── QuickCreate
│ │ │ │ │ │ └── ContactQuickCreate.d.ts
│ │ │ │ │ └── TaskFlowForm
│ │ │ │ │ │ └── UpdateContact.d.ts
│ │ │ │ └── systemuser
│ │ │ │ │ ├── AppointmentBook
│ │ │ │ │ └── Information.d.ts
│ │ │ │ │ ├── Main
│ │ │ │ │ ├── ApplicationUser.d.ts
│ │ │ │ │ ├── User.d.ts
│ │ │ │ │ └── UserformBusiness.d.ts
│ │ │ │ │ └── Quick
│ │ │ │ │ └── UserHierarchyTileForm.d.ts
│ │ │ ├── Web
│ │ │ │ ├── account.d.ts
│ │ │ │ ├── activityparty.d.ts
│ │ │ │ ├── bulkoperationlog.d.ts
│ │ │ │ ├── connection.d.ts
│ │ │ │ ├── contact.d.ts
│ │ │ │ ├── dg_account_account.d.ts
│ │ │ │ ├── dg_account_contact.d.ts
│ │ │ │ ├── msdyn_accountkpiitem.d.ts
│ │ │ │ ├── msdyn_contactkpiitem.d.ts
│ │ │ │ ├── postfollow.d.ts
│ │ │ │ └── systemuser.d.ts
│ │ │ ├── _internal
│ │ │ │ ├── Enum
│ │ │ │ │ ├── LCID.d.ts
│ │ │ │ │ ├── account_accountcategorycode.d.ts
│ │ │ │ │ ├── account_accountclassificationcode.d.ts
│ │ │ │ │ ├── account_accountratingcode.d.ts
│ │ │ │ │ ├── account_address1_addresstypecode.d.ts
│ │ │ │ │ ├── account_address1_freighttermscode.d.ts
│ │ │ │ │ ├── account_address1_shippingmethodcode.d.ts
│ │ │ │ │ ├── account_address2_addresstypecode.d.ts
│ │ │ │ │ ├── account_address2_freighttermscode.d.ts
│ │ │ │ │ ├── account_address2_shippingmethodcode.d.ts
│ │ │ │ │ ├── account_businesstypecode.d.ts
│ │ │ │ │ ├── account_customersizecode.d.ts
│ │ │ │ │ ├── account_customertypecode.d.ts
│ │ │ │ │ ├── account_industrycode.d.ts
│ │ │ │ │ ├── account_ownershipcode.d.ts
│ │ │ │ │ ├── account_paymenttermscode.d.ts
│ │ │ │ │ ├── account_preferredappointmentdaycode.d.ts
│ │ │ │ │ ├── account_preferredappointmenttimecode.d.ts
│ │ │ │ │ ├── account_preferredcontactmethodcode.d.ts
│ │ │ │ │ ├── account_shippingmethodcode.d.ts
│ │ │ │ │ ├── account_statecode.d.ts
│ │ │ │ │ ├── account_statuscode.d.ts
│ │ │ │ │ ├── account_territorycode.d.ts
│ │ │ │ │ ├── activityparty_instancetypecode.d.ts
│ │ │ │ │ ├── activityparty_participationtypemask.d.ts
│ │ │ │ │ ├── connection_record1objecttypecode.d.ts
│ │ │ │ │ ├── connection_record2objecttypecode.d.ts
│ │ │ │ │ ├── connection_statecode.d.ts
│ │ │ │ │ ├── connection_statuscode.d.ts
│ │ │ │ │ ├── contact_accountrolecode.d.ts
│ │ │ │ │ ├── contact_address1_addresstypecode.d.ts
│ │ │ │ │ ├── contact_address1_freighttermscode.d.ts
│ │ │ │ │ ├── contact_address1_shippingmethodcode.d.ts
│ │ │ │ │ ├── contact_address2_addresstypecode.d.ts
│ │ │ │ │ ├── contact_address2_freighttermscode.d.ts
│ │ │ │ │ ├── contact_address2_shippingmethodcode.d.ts
│ │ │ │ │ ├── contact_address3_addresstypecode.d.ts
│ │ │ │ │ ├── contact_address3_freighttermscode.d.ts
│ │ │ │ │ ├── contact_address3_shippingmethodcode.d.ts
│ │ │ │ │ ├── contact_customersizecode.d.ts
│ │ │ │ │ ├── contact_customertypecode.d.ts
│ │ │ │ │ ├── contact_educationcode.d.ts
│ │ │ │ │ ├── contact_familystatuscode.d.ts
│ │ │ │ │ ├── contact_gendercode.d.ts
│ │ │ │ │ ├── contact_haschildrencode.d.ts
│ │ │ │ │ ├── contact_leadsourcecode.d.ts
│ │ │ │ │ ├── contact_msdyn_orgchangestatus.d.ts
│ │ │ │ │ ├── contact_paymenttermscode.d.ts
│ │ │ │ │ ├── contact_preferredappointmentdaycode.d.ts
│ │ │ │ │ ├── contact_preferredappointmenttimecode.d.ts
│ │ │ │ │ ├── contact_preferredcontactmethodcode.d.ts
│ │ │ │ │ ├── contact_shippingmethodcode.d.ts
│ │ │ │ │ ├── contact_statecode.d.ts
│ │ │ │ │ ├── contact_statuscode.d.ts
│ │ │ │ │ ├── contact_territorycode.d.ts
│ │ │ │ │ ├── dg_account_dg_multiselect.d.ts
│ │ │ │ │ ├── msdyn_accountkpiitem_statecode.d.ts
│ │ │ │ │ ├── msdyn_accountkpiitem_statuscode.d.ts
│ │ │ │ │ ├── msdyn_contactkpiitem_statecode.d.ts
│ │ │ │ │ ├── msdyn_contactkpiitem_statuscode.d.ts
│ │ │ │ │ ├── msdyn_msdyn_accountkpiitem_msdyn_relationshiphealthscorestate.d.ts
│ │ │ │ │ ├── msdyn_msdyn_accountkpiitem_msdyn_relationshiphealthtrend.d.ts
│ │ │ │ │ ├── msdyn_msdyn_contactkpiitem_msdyn_relationshiphealthscorestate.d.ts
│ │ │ │ │ ├── msdyn_msdyn_contactkpiitem_msdyn_relationshiphealthtrend.d.ts
│ │ │ │ │ ├── msdyn_travelchargetype.d.ts
│ │ │ │ │ ├── systemuser_accessmode.d.ts
│ │ │ │ │ ├── systemuser_address1_addresstypecode.d.ts
│ │ │ │ │ ├── systemuser_address1_shippingmethodcode.d.ts
│ │ │ │ │ ├── systemuser_address2_addresstypecode.d.ts
│ │ │ │ │ ├── systemuser_address2_shippingmethodcode.d.ts
│ │ │ │ │ ├── systemuser_caltype.d.ts
│ │ │ │ │ ├── systemuser_emailrouteraccessapproval.d.ts
│ │ │ │ │ ├── systemuser_incomingemaildeliverymethod.d.ts
│ │ │ │ │ ├── systemuser_invitestatuscode.d.ts
│ │ │ │ │ ├── systemuser_outgoingemaildeliverymethod.d.ts
│ │ │ │ │ ├── systemuser_preferredaddresscode.d.ts
│ │ │ │ │ ├── systemuser_preferredemailcode.d.ts
│ │ │ │ │ └── systemuser_preferredphonecode.d.ts
│ │ │ │ ├── WebResources.d.ts
│ │ │ │ ├── sdk.d.ts
│ │ │ │ └── web-entities.d.ts
│ │ │ ├── dg.xrmquery.web.d.ts
│ │ │ ├── metadata.d.ts
│ │ │ └── xrm.d.ts
│ │ └── jquery
│ │ │ └── jquery.d.ts
│ ├── web.Debug.config
│ └── web.config
│ ├── Workflow
│ ├── AccountCustomActivity.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Workflow.csproj
│ ├── app.config
│ └── packages.config
│ └── XrmOrg.XrmSolution.sln
├── rename.cmd
└── rename.fsx
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp text=auto eol=lf
6 | *.fs diff=csharp text=auto eol=lf
7 | *.fsi diff=csharp text=auto eol=lf
8 | *.fsx diff=csharp text=auto eol=lf
9 | *.sln text eol=crlf merge=union
10 | *.csproj merge=union
11 | *.vbproj merge=union
12 | *.fsproj merge=union
13 | *.dbproj merge=union
14 |
15 | # Standard to msysgit
16 | *.doc diff=astextplain
17 | *.DOC diff=astextplain
18 | *.docx diff=astextplain
19 | *.DOCX diff=astextplain
20 | *.dot diff=astextplain
21 | *.DOT diff=astextplain
22 | *.pdf diff=astextplain
23 | *.PDF diff=astextplain
24 | *.rtf diff=astextplain
25 | *.RTF diff=astextplain
26 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Delegate A/S
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/XrmOrg/XrmFramework.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmFramework.snk
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/.nuget/NuGet.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/.nuget/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/BusinessDomain/BusinessDomain.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {7FED3BDB-A703-46DE-8F60-D4B12900B95D}
8 | Library
9 | Properties
10 | DG.XrmFramework.BusinessDomain
11 | Delegate.XrmFramework.BusinessDomain
12 | v4.6.2
13 | 512
14 | SAK
15 | SAK
16 | SAK
17 | SAK
18 | ..\
19 |
20 |
21 |
22 | true
23 | full
24 | false
25 | bin\Debug\
26 | DEBUG;TRACE
27 | prompt
28 | 4
29 | false
30 |
31 |
32 | pdbonly
33 | true
34 | bin\Release\
35 | TRACE
36 | prompt
37 | 4
38 | false
39 |
40 |
41 | true
42 |
43 |
44 | false
45 |
46 |
47 | ..\..\XrmFramework.snk
48 |
49 |
50 |
51 | ..\packages\Microsoft.CrmSdk.CoreAssemblies.9.0.2.34\lib\net462\Microsoft.Crm.Sdk.Proxy.dll
52 |
53 |
54 | ..\packages\Microsoft.IdentityModel.6.1.7600.16394\lib\net35\Microsoft.IdentityModel.dll
55 |
56 |
57 | ..\packages\Microsoft.CrmSdk.CoreAssemblies.9.0.2.34\lib\net462\Microsoft.Xrm.Sdk.dll
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
93 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/BusinessDomain/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("Delegate.XrmFramework.BusinessLogic")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("Delegate A/S")]
13 | [assembly: AssemblyProduct("Delegate.XrmFramework.BusinessLogic")]
14 | [assembly: AssemblyCopyright("Copyright © Delegate A/S 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | // Setting ComVisible to false makes the types in this assembly not visible
19 | // to COM components. If you need to access a type in this assembly from
20 | // COM, set the ComVisible attribute to true on that type.
21 | [assembly: ComVisible(false)]
22 |
23 | // The following GUID is for the ID of the typelib if this project is exposed to COM
24 | [assembly: Guid("31242a73-a0bc-4e7a-bc82-3edbdab987d2")]
25 |
26 | // Version information for an assembly consists of the following four values:
27 | //
28 | // Major Version
29 | // Minor Version
30 | // Build Number
31 | // Revision
32 | //
33 | // You can specify all the values or you can default the Build and Revision Numbers
34 | // by using the '*' as shown below:
35 | // [assembly: AssemblyVersion("1.0.*")]
36 | [assembly: AssemblyVersion("1.0.0.0")]
37 | [assembly: AssemblyFileVersion("1.0.0.0")]
38 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/BusinessDomain/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/BusinessLogic/BusinessException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace DG.XrmFramework.BusinessLogic
4 | {
5 | public class BusinessException : Exception
6 | {
7 | public BusinessErrorCode ErrorCode { get; set; }
8 |
9 | public BusinessException(string message, BusinessErrorCode code)
10 | : base(message)
11 | {
12 | ErrorCode = code;
13 | }
14 |
15 | ///
16 | /// All Errorcodes has a two digit group prefix and a three digit unique code (format. XXYYY)
17 | /// Sample:
18 | /// Create Account (Prefix 10)
19 | /// CreateAccount = 10001,
20 | ///
21 | public enum BusinessErrorCode
22 | {
23 | None = 0,
24 | CreateAccount = 10001,
25 |
26 | };
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/BusinessLogic/Helpers/HelperUtils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Security.Cryptography;
3 | using System.ServiceModel;
4 | using System.Text;
5 |
6 | using Microsoft.Xrm.Sdk;
7 |
8 | namespace DG.XrmFramework.BusinessLogic.Helpers
9 | {
10 | public static class HelperUtils
11 | {
12 | #region Inner classes
13 |
14 | #endregion
15 |
16 | #region Private properties
17 |
18 | #endregion
19 |
20 | #region Public properties
21 |
22 | #endregion
23 |
24 | #region Constructors
25 |
26 | #endregion
27 |
28 | #region Static methods
29 |
30 | public static string ErrorMessageWrapper(Exception ex)
31 | {
32 | var msg = String.Empty;
33 |
34 | try
35 | {
36 | throw ex;
37 | }
38 | catch (FaultException ex_)
39 | {
40 | msg += String.Format("The application terminated with an error.\n");
41 | msg += String.Format("Timestamp: {0}\n", ex_.Detail.Timestamp);
42 | msg += String.Format("Code: {0}\n", ex_.Detail.ErrorCode);
43 | msg += String.Format("Message: {0}\n", ex_.Detail.Message);
44 | msg += String.Format("Inner Fault: {0}\n",
45 | null == ex_.Detail.InnerFault ?
46 | "No Inner Fault\n" : "Has Inner Fault\n");
47 | }
48 | catch (System.TimeoutException ex_)
49 | {
50 | msg += String.Format("The application terminated with an error.\n");
51 | msg += String.Format("Message: {0}\n", ex_.Message);
52 | msg += String.Format("Stack Trace: {0}\n", ex_.StackTrace);
53 | msg += String.Format("Inner Fault: {0}\n",
54 | null == ex_.InnerException.Message ?
55 | "No Inner Fault\n" : ex_.InnerException.Message + "\n");
56 | }
57 | catch (System.Exception ex_)
58 | {
59 | msg += String.Format("The application terminated with an error.\n");
60 | msg += String.Format(ex.Message);
61 |
62 | // Display the details of the inner ex_ception.
63 | if (ex.InnerException != null)
64 | {
65 | msg += String.Format(ex.InnerException.Message + "\n");
66 |
67 | var fe = ex_.InnerException as FaultException;
68 | if (fe != null)
69 | {
70 | msg += String.Format("Timestamp: {0}\n", fe.Detail.Timestamp);
71 | msg += String.Format("Code: {0}\n", fe.Detail.ErrorCode);
72 | msg += String.Format("Message: {0}\n", fe.Detail.Message);
73 | msg += String.Format("Trace: {0}\n", fe.Detail.TraceText);
74 | msg += String.Format("Inner Fault: {0}\n",
75 | null == fe.Detail.InnerFault ?
76 | "No Inner Fault\n" : "Has Inner Fault\n");
77 | }
78 | }
79 | }
80 |
81 | return msg;
82 | }
83 |
84 | public static string Salt()
85 | {
86 | var random = new byte[16];
87 | using (var rng = new System.Security.Cryptography.RNGCryptoServiceProvider())
88 | {
89 | rng.GetNonZeroBytes(random);
90 | }
91 |
92 | return Convert.ToBase64String(random);
93 | }
94 |
95 | public static string SHA256CheckSum(string value, string salt)
96 | {
97 | return BitConverter
98 | .ToString(
99 | SHA256Managed
100 | .Create()
101 | .ComputeHash(Encoding.ASCII.GetBytes(value + salt)))
102 | .Replace("-", String.Empty);
103 | }
104 |
105 | #endregion
106 |
107 | #region Public methods
108 |
109 | #endregion
110 |
111 | #region Factory methods
112 |
113 | #endregion
114 |
115 | #region Interface members
116 |
117 | #endregion
118 |
119 | #region Protected methods
120 |
121 | #endregion
122 |
123 | #region Private methods
124 |
125 | #endregion
126 |
127 | #region Private classes
128 |
129 | #endregion
130 | }
131 |
132 | #region Other classes
133 |
134 | #endregion
135 | }
136 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/BusinessLogic/ManagerAccount.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | using Microsoft.Xrm.Sdk;
8 | using System.ServiceModel.Description;
9 |
10 | using DG.XrmFramework.BusinessDomain.ServiceContext;
11 | using DG.XrmFramework.BusinessLogic.Helpers;
12 | using HBD = DG.XrmFramework.BusinessLogic.Helpers.HelperBusinessDomain;
13 | using HP = DG.XrmFramework.BusinessLogic.Helpers.HelperPlugin;
14 | using HU = DG.XrmFramework.BusinessLogic.Helpers.HelperUtils;
15 | using Microsoft.Xrm.Sdk.Workflow;
16 |
17 | namespace DG.XrmFramework.BusinessLogic.Managers
18 | {
19 | public class ManagerAccount : ManagerBase
20 | {
21 |
22 | #region Constructors
23 |
24 | public ManagerAccount(
25 | ITracingService pluginTracingService,
26 | IPluginExecutionContext pluginExecutionContext,
27 | IOrganizationService pluginOrgService,
28 | IOrganizationService pluginOrgAdminService)
29 | : base(pluginTracingService, pluginExecutionContext,
30 | pluginOrgService, pluginOrgAdminService) { }
31 |
32 | public ManagerAccount(
33 | ITracingService tracingService,
34 | IWorkflowContext workflowExecutionContext,
35 | IOrganizationService orgService,
36 | IOrganizationService orgAdminService)
37 | : base(tracingService, workflowExecutionContext,
38 | orgService, orgAdminService) { }
39 |
40 | public ManagerAccount(
41 | ITracingService tracingService,
42 | IOrganizationService orgService,
43 | IOrganizationService orgAdminService)
44 | : base(tracingService, orgService, orgAdminService) { }
45 |
46 | #endregion
47 |
48 |
49 | public void FooPlugin(Guid primaryEntityId, bool isUpdate) {
50 | var contactManager = GetManager();
51 | using (var context = new Xrm(this.orgService)) {
52 | var account = context.AccountSet.FirstOrDefault();
53 | throw new NotImplementedException();
54 | }
55 | }
56 |
57 | public Guid BarWorkflow(Guid accountId) {
58 | throw new NotImplementedException();
59 | }
60 |
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/BusinessLogic/ManagerContact.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | using Microsoft.Xrm.Sdk;
8 | using System.ServiceModel.Description;
9 |
10 | using DG.XrmFramework.BusinessDomain.ServiceContext;
11 | using DG.XrmFramework.BusinessLogic.Helpers;
12 | using HBD = DG.XrmFramework.BusinessLogic.Helpers.HelperBusinessDomain;
13 | using HP = DG.XrmFramework.BusinessLogic.Helpers.HelperPlugin;
14 | using HU = DG.XrmFramework.BusinessLogic.Helpers.HelperUtils;
15 | using Microsoft.Xrm.Sdk.Workflow;
16 |
17 | namespace DG.XrmFramework.BusinessLogic.Managers
18 | {
19 | public class ManagerContact : ManagerBase
20 | {
21 |
22 | #region Constructors
23 |
24 | public ManagerContact(
25 | ITracingService pluginTracingService,
26 | IPluginExecutionContext pluginExecutionContext,
27 | IOrganizationService pluginOrgService,
28 | IOrganizationService pluginOrgAdminService)
29 | : base(pluginTracingService, pluginExecutionContext,
30 | pluginOrgService, pluginOrgAdminService) { }
31 |
32 | public ManagerContact(
33 | ITracingService tracingService,
34 | IWorkflowContext workflowExecutionContext,
35 | IOrganizationService orgService,
36 | IOrganizationService orgAdminService)
37 | : base(tracingService, workflowExecutionContext,
38 | orgService, orgAdminService) { }
39 |
40 | public ManagerContact(
41 | ITracingService tracingService,
42 | IOrganizationService orgService,
43 | IOrganizationService orgAdminService)
44 | : base(tracingService, orgService, orgAdminService) { }
45 |
46 | #endregion
47 |
48 |
49 | public void Baz() {
50 | }
51 |
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/BusinessLogic/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("Delegate.XrmFramework.BusinessLogic")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("Delegate A/S")]
13 | [assembly: AssemblyProduct("Delegate.XrmFramework.BusinessLogic")]
14 | [assembly: AssemblyCopyright("Copyright © Delegate A/S 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | // Setting ComVisible to false makes the types in this assembly not visible
19 | // to COM components. If you need to access a type in this assembly from
20 | // COM, set the ComVisible attribute to true on that type.
21 | [assembly: ComVisible(false)]
22 |
23 | // The following GUID is for the ID of the typelib if this project is exposed to COM
24 | [assembly: Guid("31242a73-a0bc-4e7a-bc82-3edbdab987d2")]
25 |
26 | // Version information for an assembly consists of the following four values:
27 | //
28 | // Major Version
29 | // Minor Version
30 | // Build Number
31 | // Revision
32 | //
33 | // You can specify all the values or you can default the Build and Revision Numbers
34 | // by using the '*' as shown below:
35 | // [assembly: AssemblyVersion("1.0.*")]
36 | [assembly: AssemblyVersion("1.0.0.0")]
37 | [assembly: AssemblyFileVersion("1.0.0.0")]
38 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/BusinessLogic/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/BusinessLogic/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/ConsoleJobs/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/ConsoleJobs/Containers/CsvContainer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Configuration;
5 | using System.IO;
6 | using System.Linq;
7 | using System.Text;
8 |
9 | namespace DG.XrmOrg.XrmSolution.ConsoleJobs.Containers
10 | {
11 | internal class CsvContainer where T : struct
12 | {
13 | public T Attributes { get; set; }
14 |
15 | public CsvContainer(T attributes)
16 | {
17 | Attributes = attributes;
18 | }
19 |
20 | ///
21 | /// Gets a CSV header corresponding to the field names in Attributes, using the separator specified in App.config
22 | ///
23 | ///
24 | public static string GetCsvHeader()
25 | {
26 | return string.Join(ConfigurationManager.AppSettings["CsvSeparator"], typeof(T).GetFields().Select(field => field.Name));
27 | }
28 | ///
29 | /// Gets a CSV string corresponding to the field values in Attributes, using the separator specified in App.config
30 | ///
31 | ///
32 | public string ToCsvString()
33 | {
34 | return string.Join(ConfigurationManager.AppSettings["CsvSeparator"], typeof(T).GetFields().Select(field => field.GetValue(Attributes)));
35 | }
36 |
37 | ///
38 | /// Parses a CsvContainer from a CSV string, expects the CSV string to correspond to the Attributes struct
39 | ///
40 | /// The string to parse
41 | /// Whether the CSV string was generated by D365 Advanced Find - skips the first 3 columns if true
42 | /// A CsvContainer parsed from the string
43 | public static T FromCsvString(string csvString, bool fromAdvancedFind = false)
44 | {
45 | var attributeStrings = csvString.Split(ConfigurationManager.AppSettings["CsvSeparator"].First());
46 | object attributesBoxed = new T();
47 | for (int i = fromAdvancedFind ? 3 : 0; i < attributeStrings.Length; i++)
48 | {
49 | var attribute = attributeStrings[i];
50 | try
51 | {
52 | var field = attributesBoxed.GetType().GetFields()[fromAdvancedFind ? i - 3 : i];
53 | var val = TypeDescriptor.GetConverter(typeof(T).GetFields()[fromAdvancedFind ? i - 3 : i].FieldType).ConvertFromString(attribute);
54 | field.SetValue(attributesBoxed, val);
55 | }
56 | catch (Exception ex)
57 | {
58 | Console.WriteLine("Encountered error parsing CSV string: " + ex.ToString());
59 | throw;
60 | }
61 | }
62 | T attributes = (T)attributesBoxed;
63 | return attributes;
64 | }
65 |
66 | ///
67 | /// Reads a list of Attributes , expects the format to correspond to the Attributes struct
68 | ///
69 | /// The path to the CSV file
70 | /// Whether the CSV string was generated by D365 Advanced Find - skips the first 3 columns if true
71 | /// Whether the file contains a header
72 | /// A list of CsvContainers, each corresponding to a row in the file
73 | public static List ReadFromCsv(string csvFilePath, bool fromAdvancedFind = false, bool hasHeader = true)
74 | {
75 | string res = "";
76 | StreamReader perfReader = new StreamReader(csvFilePath, Encoding.UTF8);
77 | try
78 | {
79 | res = perfReader.ReadToEnd();
80 | }
81 | finally
82 | {
83 | perfReader.Close();
84 | }
85 | var resList = res.Split(new string[] { Environment.NewLine }, StringSplitOptions.None).ToList();
86 | resList.RemoveAll(x => string.IsNullOrWhiteSpace(x));
87 |
88 | if (hasHeader)
89 | {
90 | resList.RemoveAt(0);
91 | }
92 |
93 | var returnList = new List();
94 | foreach (var containerString in resList)
95 | {
96 | returnList.Add(FromCsvString(containerString, fromAdvancedFind));
97 | }
98 | return returnList;
99 | }
100 | }
101 | }
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/ConsoleJobs/Helpers/ListExtension.cs:
--------------------------------------------------------------------------------
1 | using DG.XrmOrg.XrmSolution.ConsoleJobs.Containers;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace DG.XrmOrg.XrmSolution.ConsoleJobs.Helpers
8 | {
9 | internal static class ListExtension
10 | {
11 | ///
12 | /// Prints a list of containers to a CSV file. Creates file if it doesn't exist. Overwrites file if it exists by default (appendToFileIfExists = false).
13 | ///
14 | /// The containers to write to file
15 | /// The path to the file
16 | /// Optional. Whether or not to append to file if it already exists. Default: False
17 | public static void PrintToCsv(this List> containers, string filePath, bool appendToFileIfExists = false) where T : struct
18 | {
19 | if (string.IsNullOrWhiteSpace(filePath))
20 | {
21 | throw new InvalidDataException("File path is empty");
22 | }
23 | var header = CsvContainer.GetCsvHeader();
24 |
25 | StreamWriter perfWriter = new StreamWriter(filePath, appendToFileIfExists, Encoding.UTF8);
26 | try
27 | {
28 | if (!string.IsNullOrWhiteSpace(header) && !appendToFileIfExists)
29 | {
30 | perfWriter.WriteLine(header);
31 | }
32 | foreach (var item in containers)
33 | {
34 | perfWriter.WriteLine(item.ToCsvString());
35 | }
36 | }
37 | finally
38 | {
39 | perfWriter.Close();
40 | }
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/ConsoleJobs/Jobs/ExampleInvokeManagerJob.cs:
--------------------------------------------------------------------------------
1 | using DG.XrmFramework.BusinessDomain.ServiceContext;
2 | using DG.XrmFramework.BusinessLogic.Managers;
3 | using System.Linq;
4 |
5 | namespace DG.XrmOrg.XrmSolution.ConsoleJobs.Jobs
6 | {
7 | internal class ExampleInvokeManagerJob : IJob
8 | {
9 | public void Run(EnvironmentConfig env)
10 | {
11 | using (var ctx = new Xrm(env.Service))
12 | {
13 | var account = ctx.AccountSet.FirstOrDefault();
14 |
15 | var accountManager = new ManagerAccount(env.Tracing, env.Service, env.Service);
16 | accountManager.BarWorkflow(account.Id);
17 | }
18 |
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/ConsoleJobs/Jobs/ExampleJob.cs:
--------------------------------------------------------------------------------
1 | using DG.XrmFramework.BusinessDomain.ServiceContext;
2 | using DG.XrmFramework.BusinessLogic.Managers;
3 | using System.Linq;
4 |
5 | namespace DG.XrmOrg.XrmSolution.ConsoleJobs.Jobs
6 | {
7 | internal class ExampleJob : IJob
8 | {
9 | public void Run(EnvironmentConfig env)
10 | {
11 | using (var ctx = new Xrm(env.Service))
12 | {
13 | var account = ctx.AccountSet.FirstOrDefault();
14 |
15 | var accountManager = new ManagerAccount(env.Tracing, env.Service, env.Service);
16 | accountManager.BarWorkflow(account.Id);
17 | }
18 |
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/ConsoleJobs/Jobs/ExampleReadFromCsvJob.cs:
--------------------------------------------------------------------------------
1 | using DG.XrmFramework.BusinessDomain.ServiceContext;
2 | using DG.XrmOrg.XrmSolution.ConsoleJobs.Containers;
3 | using System;
4 | using System.IO;
5 |
6 | namespace DG.XrmOrg.XrmSolution.ConsoleJobs.Jobs
7 | {
8 | internal class ExampleReadFromCsvJob : IJob
9 | {
10 | //A path to our desired CSV file
11 | private readonly string csvFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "csvFile.csv");
12 | //The data our job will read from the CSV file (in this case we expect our file to have 1 column which can be parsed as a Guid)
13 | struct Attributes
14 | {
15 | public Guid Id;
16 | }
17 | public void Run(EnvironmentConfig env)
18 | {
19 | //Read the entities from our CSV file, which matches the format of our Attributes struct
20 | var entitiesFromCSV = CsvContainer.ReadFromCsv(csvFilePath);
21 |
22 | var current = 0;
23 | var count = entitiesFromCSV.Count;
24 | foreach (var entity in entitiesFromCSV)
25 | {
26 | //Print out a progress indicator every 100 entities
27 | if (current % 100 == 0)
28 | {
29 | env.Tracing.Trace($"Progress: {current}/{count}");
30 | }
31 |
32 | //Make some update on the entity
33 | var updEntity = new Account()
34 | {
35 | Id = entity.Id,
36 | StatusCode = Account_StatusCode.Somestatus
37 | };
38 | env.Service.Update(updEntity);
39 | current++;
40 | }
41 | env.Tracing.Trace($"Progress: {current}/{count}");
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/ConsoleJobs/Jobs/ExampleWriteToCsvJob.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.IO;
4 | using DG.XrmOrg.XrmSolution.ConsoleJobs.Containers;
5 | using DG.XrmOrg.XrmSolution.ConsoleJobs.Helpers;
6 | using DG.XrmFramework.BusinessDomain.ServiceContext;
7 |
8 | namespace DG.XrmOrg.XrmSolution.ConsoleJobs.Jobs
9 | {
10 | internal class ExampleWriteToCsvJob : IJob
11 | {
12 | //A path to our desired CSV file
13 | private readonly string csvFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "csvFile.csv");
14 | //The data our job will write to the CSV file
15 | struct Attributes
16 | {
17 | public string AccountName;
18 | public Guid Id;
19 | public string Address;
20 | }
21 | public void Run(EnvironmentConfig env)
22 | {
23 | using (var ctx = new Xrm(env.Service))
24 | {
25 | //We make some query towards CRM and project the result into a list of CsvContainers
26 | var entities = ctx.AccountSet
27 | .Where(x => x.CreatedOn > DateTime.Now.AddYears(-3))
28 | .Select(x =>
29 | new CsvContainer(
30 | new Attributes()
31 | {
32 | AccountName = x.Name,
33 | Id = x.Id,
34 | Address = x.Address1_Line1
35 | }))
36 | .ToList();
37 | //We print our list of CsvContainers to the CSV file
38 | entities.PrintToCsv(csvFilePath);
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/ConsoleJobs/Jobs/IJob.cs:
--------------------------------------------------------------------------------
1 | namespace DG.XrmOrg.XrmSolution.ConsoleJobs.Jobs
2 | {
3 | internal interface IJob
4 | {
5 | void Run(EnvironmentConfig env);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/ConsoleJobs/Program.cs:
--------------------------------------------------------------------------------
1 | using DG.XrmOrg.XrmSolution.ConsoleJobs.Jobs;
2 | using System;
3 | using System.Configuration;
4 |
5 | namespace DG.XrmOrg.XrmSolution.ConsoleJobs
6 | {
7 | internal static class Program
8 | {
9 | static void Main(string[] args)
10 | {
11 | var env = GetEnviromentFromConfig();
12 | IJob job = GetJobFromConfiguration(); //Used to get the job from the app config file
13 | ExecuteJobOnEnvironment(env, job);
14 | }
15 |
16 | ///
17 | /// Gets the enviroment from app config.
18 | ///
19 | ///
20 | private static EnvironmentEnum GetEnviromentFromConfig()
21 | {
22 | EnvironmentEnum result;
23 | var envStr = ConfigurationManager.AppSettings["Environment"];
24 | if (string.IsNullOrWhiteSpace(envStr) || !Enum.TryParse(envStr, out result))
25 | {
26 | throw new ConfigurationErrorsException("Environment not specified in App.config or could not be parsed as EnvironmentEnum");
27 | }
28 | return result;
29 | }
30 |
31 | ///
32 | /// Creates an instance of the IJob given the classname.
33 | ///
34 | ///
35 | private static IJob GetJobFromConfiguration()
36 | {
37 | var envStr = ConfigurationManager.AppSettings["JobClassName"];
38 | if (string.IsNullOrWhiteSpace(envStr))
39 | {
40 | throw new ConfigurationErrorsException("JobClassName not specified in App.config");
41 | }
42 | Type t = Type.GetType(envStr);
43 | return (IJob)Activator.CreateInstance(t);
44 | }
45 | ///
46 | /// Creates a connection to CRM by getting the clientid and secret from the app config.
47 | ///
48 | ///
49 | ///
50 | private static EnvironmentConfig GetEnv(EnvironmentEnum env)
51 | {
52 | var clientId = ConfigurationManager.AppSettings["ClientId"];
53 | if (string.IsNullOrWhiteSpace(clientId))
54 | {
55 | throw new ConfigurationErrorsException("ClientId not specified in App.config");
56 | }
57 |
58 | var secret = ConfigurationManager.AppSettings["ClientSecret"];
59 | if (string.IsNullOrWhiteSpace(secret))
60 | {
61 | throw new ConfigurationErrorsException("ClientSecret not specified in App.config");
62 | }
63 |
64 | var newEnv = EnvironmentConfig.Create(env, clientId, secret);
65 | return newEnv;
66 | }
67 |
68 | ///
69 | /// Executes the job on the specified environment
70 | ///
71 | /// The environment the job should be executed on
72 | /// The job to execute
73 | private static void ExecuteJobOnEnvironment(EnvironmentEnum env, IJob job)
74 | {
75 | Console.WriteLine($"You are attempting to run {job.GetType().Name} on {env}.\nPress 'Y' to continue...");
76 | var keyPressed = Console.ReadKey();
77 | if (keyPressed.Key != ConsoleKey.Y)
78 | {
79 | Console.WriteLine("Aborted by user.\nExiting...");
80 | return;
81 | }
82 | var environment = GetEnv(env);
83 | try
84 | {
85 | job.Run(environment);
86 | }
87 | catch (Exception e)
88 | {
89 | Console.WriteLine(e.Message);
90 | }
91 | Console.WriteLine("Program finished.\nPress any key to continue...");
92 | Console.ReadKey();
93 | }
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/ConsoleJobs/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("ConsoleJobs")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ConsoleJobs")]
13 | [assembly: AssemblyCopyright("Copyright © 2022")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("893c13b4-66f0-4f77-a2a5-7407bfa8bc32")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/ConsoleJobs/README.md:
--------------------------------------------------------------------------------
1 | # ConsoleJobs
2 | ConsoleJobs is a framework that streamlines the development of jobs/scripts that run against D365 using self-contained, single-configured jobs with CSV read/write capability.
3 |
4 | ## Features
5 | - **Self-contained jobs.** You write the entirety of your ConsoleJob in one file.
6 | - **Centralized configuration.** All necessary configuration is in App.config.
7 | - **Methods for reading and writing to CSV files.** Generic read and write methods are provided with minimal per-job setup.
8 |
9 | ## Configuration
10 | In App.config, define the following parameters:
11 |
12 | `Environment` The environment to run your ConsoleJob against.
13 |
14 | `JobClassName` The full name of the ConsoleJob to run.
15 |
16 | `ClientId` The client ID of your D365 tenant.
17 |
18 | `ClientSecret` The client secret of your D365 tenant.
19 |
20 | `DevEnv`, `TestEnv`, `ProdEnv`: URLs of your Dev, Test, and Prod environments.
21 |
22 | `CsvSeparator` Separator to used for CSV files. Configured here for convenience, due to Excel's regional differences.
23 |
24 | ## Usage
25 | Create your job as a class implementing the `IJob` interface in the /Jobs directory. Set the `ConsoleJobs` project as your startup project, make sure `JobClassName` and `Environment` are set correctly in App.config and run.
26 |
27 | ### Adding Additional Environments
28 | To add additional environments, create an entry in App.config for it in the same fashion as the other environments, expand the `EnvironmentsEnum` and `GetUrlFromEnvironment()` in `EnvironmentConfig.cs` to include your new environment.
29 |
30 | ## CsvContainer
31 | `CsvContainer` is a class which exposes methods for reading and writing data to and from CSV files.
32 |
33 | To create an instance of a CsvContainer, define a struct which represents the data in your CSV files and pass it as a type-argument, as well as an instance of your struct as a parameter:
34 | ```cs
35 | struct Attributes
36 | {
37 | public string Name;
38 | }
39 | var myCsvContainer = new CsvContainer(new Attributes { Name = "John Doe" });
40 | ```
41 |
42 | ### Reading CSV Files
43 | We read CSV files using the static `ReadFromCsv(string csvFilePath)`.
44 |
45 | To read a CSV file, define a struct which corresponds to the columns of your CSV file:
46 | ```cs
47 | struct Attributes
48 | {
49 | public string Name;
50 | public int Id;
51 | public string Address;
52 | }
53 | ```
54 | We can then read our file, using `ReadFromCsv`:
55 | ```cs
56 | var csvPath = "C:\Work\Contacts.csv";
57 | var people = CsvContainer.ReadFromCsv(csvPath);
58 | ```
59 |
60 | ### Writing CSV Files
61 | The List extension-method `PrintToCsv(string csvFilePath)` writes to CSV files:
62 |
63 | ```cs
64 | struct Attributes
65 | {
66 | public string Name;
67 | public int Id;
68 | public string Address;
69 | }
70 | var csvPath = "C:\Work\Contacts.csv";
71 |
72 | var people = new List>();
73 | people.Add(new CsvContainer(
74 | new Attributes{
75 | Name = "John",
76 | Id = 1,
77 | Address = "Example Street 3"
78 | }));
79 |
80 |
81 | people.PrintToCsv(newCsvPath);
82 | ```
83 |
84 | `PrintToCsv()` will create the file if it does not exist and overwrite it if it does. You can provide an optional boolean parameter, if it should append rather than overwrite:
85 | ```cs
86 | morePeople = new List>();
87 | morePeople.Add(new CsvContainer(
88 | new Attributes{
89 | Name = "Jane",
90 | Id = 2,
91 | Address = "Example Street 8"
92 | }));
93 | morePeople.PrintToCSV(newCsvPath, true);
94 | ```
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/ConsoleJobs/Setup/EnvironmentConfig.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xrm.Sdk;
2 | using Microsoft.Xrm.Tooling.Connector;
3 | using System;
4 | using System.Configuration;
5 |
6 | namespace DG.XrmOrg.XrmSolution.ConsoleJobs
7 | {
8 | internal class EnvironmentConfig
9 | {
10 | public EnvironmentEnum CurrentEnvironment { get; private set; }
11 |
12 | public string Url { get; private set; }
13 |
14 | public IOrganizationService Service { get; private set; }
15 | public ITracingService Tracing { get; private set; }
16 |
17 | private EnvironmentConfig()
18 | {
19 | Tracing = new Logger();
20 | }
21 |
22 | public static EnvironmentConfig Create(EnvironmentEnum env, string clientid, string secret)
23 | {
24 | var crmClientId = clientid;
25 | var crmSecret = secret;
26 | var crmUrl = GetUrlFromEnvironment(env);
27 | var service = ConnectOnline(crmUrl, crmClientId, crmSecret);
28 |
29 | return new EnvironmentConfig() { CurrentEnvironment = env, Url = crmUrl, Service = service };
30 | }
31 |
32 | private static IOrganizationService ConnectOnline(string url, string clientId, string secret)
33 | {
34 | var conString = string.Format("AuthType=ClientSecret;Url={0};ClientId={1};ClientSecret={2}",
35 | url,
36 | clientId,
37 | secret);
38 | var crmConn = new CrmServiceClient(conString);
39 | return crmConn;
40 | }
41 |
42 | private static string GetUrlFromEnvironment(EnvironmentEnum env)
43 | {
44 | switch (env)
45 | {
46 | case EnvironmentEnum.Dev:
47 | return ConfigurationManager.AppSettings["DevEnv"];
48 | case EnvironmentEnum.Test:
49 | return ConfigurationManager.AppSettings["TestEnv"];
50 | case EnvironmentEnum.Prod:
51 | return ConfigurationManager.AppSettings["ProdEnv"];
52 | default:
53 | throw new ArgumentException("Environment not supported");
54 | }
55 | }
56 | }
57 |
58 | internal enum EnvironmentEnum
59 | {
60 | Dev,
61 | Test,
62 | Prod
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/ConsoleJobs/Setup/Logger.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xrm.Sdk;
2 | using System;
3 |
4 | namespace DG.XrmOrg.XrmSolution.ConsoleJobs
5 | {
6 | internal class Logger : ITracingService
7 | {
8 | private string BuildLogLine(string format, params object[] args)
9 | {
10 | var formated = string.Format(format, args);
11 | DateTime timeStamp = DateTime.Now;
12 | return timeStamp.ToLongTimeString() + ": " + formated;
13 | }
14 |
15 | public void Trace(string format, params object[] args)
16 | {
17 | var line = BuildLogLine(format, args);
18 | Console.WriteLine(line);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/ConsoleJobs/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Plugins/AccountPostPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ServiceModel;
3 |
4 | using Microsoft.Xrm.Sdk;
5 |
6 | using DG.XrmFramework.BusinessDomain.ServiceContext;
7 | using DG.XrmFramework.BusinessLogic.Managers;
8 | using HU = DG.XrmFramework.BusinessLogic.Helpers.HelperUtils;
9 |
10 | namespace DG.XrmOrg.XrmSolution.Plugins {
11 |
12 | public class AccountPostPlugin : Plugin {
13 | public AccountPostPlugin()
14 | : base(typeof(AccountPostPlugin))
15 | {
16 | RegisterPluginStep(
17 | EventOperation.Update,
18 | ExecutionStage.PostOperation,
19 | ExecuteAccountPostPlugin);
20 | }
21 |
22 | protected void ExecuteAccountPostPlugin(LocalPluginContext localContext)
23 | {
24 | if (localContext == null)
25 | {
26 | throw new ArgumentNullException("localContext");
27 | }
28 |
29 | var isUpdate = MatchesEventOperation(localContext, EventOperation.Update);
30 |
31 | var accountManager = new ManagerAccount(
32 | localContext.TracingService,
33 | localContext.PluginExecutionContext,
34 | localContext.OrganizationService,
35 | localContext.OrganizationAdminService);
36 |
37 | accountManager.FooPlugin(localContext.PluginExecutionContext.PrimaryEntityId, isUpdate);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Plugins/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("Delegate.XrmOrg.XrmSolution.Plugins")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("Delegate A/S")]
13 | [assembly: AssemblyProduct("Delegate.XrmOrg.XrmSolution.Plugins")]
14 | [assembly: AssemblyCopyright("Copyright © Delegate A/S 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: Microsoft.Xrm.Sdk.Client.ProxyTypesAssemblyAttribute()]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 | [assembly: Guid("31242a73-a0bc-4e7a-bc82-3edbdab987d2")]
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // [assembly: AssemblyVersion("1.0.*")]
37 | [assembly: AssemblyVersion("1.0.0.0")]
38 | [assembly: AssemblyFileVersion("1.0.0.0")]
39 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Plugins/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Plugins/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tests/Metadata/MetadataGenerator365.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tests/Metadata/MetadataGenerator365.exe
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tests/Metadata/MetadataGenerator365.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tests/Metadata/TypeDeclarations.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace DG.Tools.XrmMockup {
4 | public struct SecurityRoles {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | [assembly: AssemblyTitle("Tests")]
6 | [assembly: AssemblyDescription("")]
7 | [assembly: AssemblyConfiguration("")]
8 | [assembly: AssemblyCompany("")]
9 | [assembly: AssemblyProduct("Tests")]
10 | [assembly: AssemblyCopyright("Copyright © 2018")]
11 | [assembly: AssemblyTrademark("")]
12 | [assembly: AssemblyCulture("")]
13 |
14 | [assembly: ComVisible(false)]
15 |
16 | [assembly: Guid("ad56821e-4658-412f-bc5a-b5015042ff45")]
17 |
18 | // [assembly: AssemblyVersion("1.0.*")]
19 | [assembly: AssemblyVersion("1.0.0.0")]
20 | [assembly: AssemblyFileVersion("1.0.0.0")]
21 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tests/TestBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using DG.Tools;
3 | using Microsoft.Xrm.Sdk;
4 | using Microsoft.VisualStudio.TestTools.UnitTesting;
5 | using DG.Tools.XrmMockup;
6 | using DG.XrmOrg.XrmSolution.Workflow;
7 | using DG.XrmFramework.BusinessDomain.ServiceContext;
8 |
9 | namespace DG.XrmFramework.Tests
10 | {
11 |
12 | [TestClass]
13 | public class TestBase
14 | {
15 | protected IOrganizationService orgAdminUIService;
16 | protected IOrganizationService orgAdminService;
17 | protected static XrmMockup365 crm;
18 |
19 | public TestBase()
20 | {
21 | this.orgAdminUIService = crm.GetAdminService(new MockupServiceSettings(true, false, MockupServiceSettings.Role.UI));
22 | this.orgAdminService = crm.GetAdminService();
23 | }
24 |
25 | [TestCleanup]
26 | public void TestCleanup()
27 | {
28 | crm.ResetEnvironment();
29 | }
30 |
31 |
32 | [AssemblyInitialize]
33 | public static void InitializeServices(TestContext context)
34 | {
35 | InitializeMockup(context);
36 | }
37 |
38 | public static void InitializeMockup(TestContext context)
39 | {
40 | var tmp = new SavedQuery(); //TODO: Temp fix to ensure BusinessDomain-assembly is loaded before running mockup. Awaits a new mockup-release https://github.com/delegateas/XrmMockup/issues/66
41 | crm = XrmMockup365.GetInstance(new XrmMockupSettings
42 | {
43 | BasePluginTypes = new Type[] { typeof(DG.XrmOrg.XrmSolution.Plugins.Plugin) },
44 | CodeActivityInstanceTypes = new Type[] { typeof(AccountCustomActivity) },
45 | EnableProxyTypes = true,
46 | IncludeAllWorkflows = true
47 | });
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tests/TestExample.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using DG.XrmFramework.BusinessDomain.ServiceContext;
4 | using Microsoft.VisualStudio.TestTools.UnitTesting;
5 |
6 | namespace DG.XrmFramework.Tests
7 | {
8 | [TestClass]
9 | public class TestExample : TestBase
10 | {
11 | [TestMethod]
12 | public void TestPrimaryContactIsCreated()
13 | {
14 | using (var context = new Xrm(orgAdminUIService))
15 | {
16 | try
17 | {
18 | var acc = new Account();
19 | acc.Id = orgAdminUIService.Create(acc);
20 |
21 | orgAdminService.Update(new Account(acc.Id));
22 | Assert.Fail();
23 | } catch(Exception e)
24 | {
25 | Assert.IsInstanceOfType(e, typeof(NotImplementedException));
26 | }
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tests/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/CustomScripting/AssignRecords.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | Assign records to owners by name
3 | *)
4 |
5 | #load @"..\Daxif\_Config.fsx"
6 |
7 | #r @"..\..\BusinessDomain\bin\Debug\Microsoft.Xrm.Sdk.dll"
8 | #r @"..\..\BusinessDomain\bin\Debug\Microsoft.Crm.Sdk.Proxy.dll"
9 | #r @"..\..\BusinessDomain\bin\Debug\Delegate.XrmFramework.BusinessDomain.dll"
10 | open DG.XrmFramework.BusinessDomain.ServiceContext
11 |
12 | open System
13 | open System.IO
14 | open Microsoft.Xrm.Sdk
15 | open Microsoft.Xrm.Sdk.Query
16 | open Microsoft.Xrm.Sdk.Messages
17 | open Microsoft.Crm.Sdk.Messages
18 |
19 | open _Config
20 | open DG.Daxif.Common
21 | open System.Web
22 |
23 |
24 | (** Configuration *)
25 | let config =
26 | [|
27 | Account.EntityLogicalName, @"AccountOwners.csv"
28 | |]
29 |
30 |
31 | let envs =
32 | [|
33 | Env.dev
34 |
35 | // Test
36 | Env.test
37 |
38 | // Production
39 | Env.prod
40 | |]
41 |
42 |
43 | (** Implementation *)
44 | let loadData path =
45 | File.ReadAllLines(Path.Combine(__SOURCE_DIRECTORY__, path), Text.Encoding.UTF8)
46 | |> Array.map (fun s -> s.Trim().Trim(';'))
47 | |> Array.filter (fun s -> s.Length > 0)
48 | |> Array.map (fun s -> s.Split(';'))
49 | |> Array.map (fun arr -> arr.[0], arr.[1])
50 |
51 | let makeAssignRequest logicalName ownerRef (guid:string) =
52 | let req = AssignRequest()
53 | req.Target <- EntityReference(logicalName, Guid(guid))
54 | req.Assignee <- ownerRef
55 | req :> OrganizationRequest
56 |
57 | let makeComparisonRetrieveRequest logicalName (attribute:string) (value:string) =
58 | let query = QueryExpression(logicalName)
59 | query.Criteria <- FilterExpression()
60 | query.Criteria.AddCondition(attribute, ConditionOperator.Equal, value)
61 | query.TopCount <- Nullable(1)
62 | let req = RetrieveMultipleRequest()
63 | req.Query <- query
64 | req :> OrganizationRequest
65 |
66 |
67 |
68 | let getOwnerMapByName proxy names =
69 | let uniqueNames = names |> Array.distinct
70 |
71 | uniqueNames
72 | |> Array.map (makeComparisonRetrieveRequest SystemUser.EntityLogicalName "fullname")
73 | |> CrmDataHelper.performAsBulk proxy
74 | |> Array.map (fun x -> uniqueNames.[x.RequestIndex], x)
75 |
76 | |> Array.partition (fun (name,x) -> (x.Response :?> RetrieveMultipleResponse).EntityCollection.Entities.Count = 1)
77 | |> (fun (found,notfound) -> // Try Team instead of SystemUser
78 | notfound
79 | |> Array.map (fst >> makeComparisonRetrieveRequest Team.EntityLogicalName "name")
80 | |> CrmDataHelper.performAsBulk proxy
81 | |> Array.map (fun x -> notfound.[x.RequestIndex] |> fst, x)
82 | |> Array.append found)
83 |
84 | |> Array.partition (fun (name,x) -> (x.Response :?> RetrieveMultipleResponse).EntityCollection.Entities.Count = 1)
85 | |> (fun (found,notfound) -> // Print owners that were not found, and make map of rest
86 | notfound
87 | |> Array.iter (fun (name,x) -> printfn "Owner with name \"%s\" was not found in the CRM system" name)
88 | found
89 | |> Array.map (fun (name,x) ->
90 | name, (x.Response :?> RetrieveMultipleResponse).EntityCollection.Entities.[0].ToEntityReference())
91 | |> Map.ofArray)
92 |
93 |
94 | let main (env:DG.Daxif.Environment) =
95 | let proxy = env.connect().GetProxy()
96 | let data = config |> Array.map (fun (entity, path) -> entity, loadData path)
97 | let ownerMap =
98 | data
99 | |> Array.map (fun (_, rows) -> rows |> Array.map snd)
100 | |> Array.concat
101 | |> getOwnerMapByName proxy
102 |
103 | data
104 | |> Array.map (fun (logicalName, rows) ->
105 | rows
106 | |> Array.choose (fun (guid, owner) -> ownerMap.TryFind owner |> Option.bind (fun owner -> Some (guid,owner)))
107 | |> Array.map (fun (guid, owner) -> makeAssignRequest logicalName owner guid))
108 | |> Array.concat
109 | |> CrmDataHelper.performAsBulk proxy
110 | |> ignore
111 |
112 |
113 |
114 | ;;
115 | printfn ""
116 | printfn "Assigning records in given environments.."
117 | printfn ""
118 | envs |> Array.Parallel.iter main
119 | printfn ""
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/CustomScripting/CountRecords.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | Assign records to owners by name
3 | *)
4 | #load @"..\Daxif\_Config.fsx"
5 |
6 | #r @"..\..\BusinessDomain\bin\Debug\Microsoft.Xrm.Sdk.dll"
7 | #r @"..\..\BusinessDomain\bin\Debug\Microsoft.Crm.Sdk.Proxy.dll"
8 | #r @"..\..\BusinessDomain\bin\Debug\Delegate.XrmFramework.BusinessDomain.dll"
9 | open DG.XrmFramework.BusinessDomain.ServiceContext
10 |
11 | open System
12 | open System.IO
13 | open Microsoft.Xrm.Sdk
14 | open Microsoft.Xrm.Sdk.Query
15 | open Microsoft.Xrm.Sdk.Messages
16 | open Microsoft.Crm.Sdk.Messages
17 |
18 | open _Config
19 | open DG.Daxif.Common
20 | open System.Web
21 |
22 | let env = Env.prod
23 | let logicalName = SavedQuery.EntityLogicalName
24 |
25 | let proxy = env.connect().GetProxy()
26 | let query = QueryExpression(logicalName)
27 | query.ColumnSet <- ColumnSet()
28 |
29 | CrmDataHelper.retrieveMultiple proxy query
30 | |> Seq.length
31 | |> printfn "%s has %i records" logicalName
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/CustomScripting/CreateOrgReportViews.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | Deactive given views
3 | *)
4 |
5 | #load @"..\Daxif\_Config.fsx"
6 |
7 | #r @"..\..\BusinessDomain\bin\Debug\Microsoft.Xrm.Sdk.dll"
8 | #r @"..\..\BusinessDomain\bin\Debug\Microsoft.Crm.Sdk.Proxy.dll"
9 | #r @"..\..\BusinessDomain\bin\Debug\Delegate.XrmFramework.BusinessDomain.dll"
10 | open DG.XrmFramework.BusinessDomain.ServiceContext
11 |
12 | open System
13 | open System.IO
14 | open Microsoft.Xrm.Sdk
15 | open Microsoft.Xrm.Sdk.Messages
16 | open Microsoft.Xrm.Sdk.Query
17 | open Microsoft.Crm.Sdk.Messages
18 |
19 | open _Config
20 | open DG.Daxif.Common
21 |
22 |
23 |
24 |
25 | (** Configuration *)
26 | let envs =
27 | [|
28 | // Test
29 | Env.test
30 |
31 | // Production
32 | Env.prod
33 | |]
34 |
35 |
36 |
37 | (** Implementation *)
38 | let businessUnitNames proxy =
39 | let req = RetrieveMultipleRequest()
40 | let query = QueryExpression("businessunit")
41 | query.ColumnSet <- ColumnSet("name")
42 | query.Criteria <- FilterExpression()
43 | req.Query <- query
44 | let resp = CrmDataHelper.getResponse proxy req
45 | resp.EntityCollection.Entities |> Seq.map (fun e -> e.Attributes.["name"] :?> string) |> Set.ofSeq
46 |
47 | let existingViews proxy =
48 | let req = RetrieveMultipleRequest()
49 | let query = QueryExpression(SavedQuery.EntityLogicalName)
50 | query.ColumnSet <- ColumnSet(true)
51 | query.Criteria <- FilterExpression()
52 | query.Criteria.AddCondition("returnedtypecode", ConditionOperator.Equal, "report")
53 | query.Criteria.AddCondition("ismanaged", ConditionOperator.Equal, false)
54 | query.Criteria.AddCondition("name", ConditionOperator.BeginsWith, "ISS ")
55 | query.Criteria.AddCondition("querytype", ConditionOperator.Equal, 0)
56 | req.Query <- query
57 | let resp = CrmDataHelper.getResponse proxy req
58 | resp.EntityCollection.Entities
59 | |> Seq.map (fun e -> (e.Attributes.["name"] :?> string).Substring(4)) |> Set.ofSeq
60 |
61 |
62 |
63 | let layoutxml = " | | | |
"
64 | let fetchxml name =
65 | sprintf "" name
66 |
67 |
68 |
69 | let makeViewCreate name =
70 | let view = Entity(SavedQuery.EntityLogicalName)
71 | view.Attributes.["name"] <- "ISS " + name
72 | view.Attributes.["returnedtypecode"] <- "report"
73 | view.Attributes.["layoutxml"] <- layoutxml
74 | view.Attributes.["fetchxml"] <- fetchxml name
75 | view.Attributes.["querytype"] <- 0
76 | let req = CreateRequest()
77 | req.Target <- view
78 | req :> OrganizationRequest
79 |
80 |
81 | let main (env:DG.Daxif.Environment) =
82 | let proxy = env.connect().GetProxy()
83 | let toCreate = Set.difference (businessUnitNames proxy) (existingViews proxy) |> Set.toArray
84 | if Array.isEmpty toCreate then
85 | printfn "All views already exist in %O" env
86 | else
87 | let resp =
88 | toCreate
89 | |> Array.map makeViewCreate
90 | |> CrmDataHelper.performAsBulk proxy
91 |
92 | resp |> Array.iter (fun r -> if r.Fault <> null then eprintfn "Error when creating view: %s" r.Fault.Message)
93 | resp |> Array.filter (fun x -> x.Fault = null)
94 | |> Array.length
95 | |> fun count -> printfn "Succesfully created %d/%d views in %O" count toCreate.Length env
96 |
97 |
98 |
99 | ;;
100 | printfn ""
101 | printfn "Creating report views in given environments.."
102 | printfn ""
103 | envs |> Array.Parallel.iter main
104 | printfn ""
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/CustomScripting/DeactiveViews.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | Deactive given views
3 | *)
4 |
5 | #load @"..\Daxif\_Config.fsx"
6 |
7 | #r @"..\..\BusinessDomain\bin\Debug\Microsoft.Xrm.Sdk.dll"
8 | #r @"..\..\BusinessDomain\bin\Debug\Microsoft.Crm.Sdk.Proxy.dll"
9 | #r @"..\..\BusinessDomain\bin\Debug\Delegate.XrmFramework.BusinessDomain.dll"
10 | open DG.XrmFramework.BusinessDomain.ServiceContext
11 |
12 | open System
13 | open System.IO
14 | open Microsoft.Xrm.Sdk
15 | open Microsoft.Crm.Sdk.Messages
16 |
17 | open _Config
18 | open DG.Daxif.Common
19 |
20 |
21 | (** Configuration *)
22 | let viewGuids =
23 | [| // View GUIDs
24 |
25 | |]
26 |
27 |
28 | let envs =
29 | [|
30 | Env.dev
31 |
32 | // Test
33 | Env.test
34 |
35 | // Production
36 | Env.prod
37 | |]
38 |
39 |
40 | (** Implementation *)
41 | let makeDeactiveRequest (guid:string) =
42 | let req = SetStateRequest()
43 | req.EntityMoniker <- EntityReference(SavedQuery.EntityLogicalName, Guid(guid))
44 | req.State <- OptionSetValue(SavedQueryState.Inactive |> int)
45 | req.Status <- OptionSetValue(-1)
46 | req :> OrganizationRequest
47 |
48 |
49 | let main (env:DG.Daxif.Environment) =
50 | let proxy = env.connect().GetProxy()
51 | viewGuids
52 | |> Array.map makeDeactiveRequest
53 | |> CrmDataHelper.performAsBulk proxy
54 | |> Array.filter (fun x -> x.Fault = null)
55 | |> Array.length
56 | |> fun count -> printfn "Succesfully deactivated %d/%d possible views in %O" count viewGuids.Length env
57 |
58 |
59 |
60 | ;;
61 | printfn ""
62 | printfn "Deactivating views in given environments.."
63 | printfn ""
64 | envs |> Array.Parallel.iter main
65 | printfn ""
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/CustomScripting/FindDuplicates.fsx:
--------------------------------------------------------------------------------
1 |
2 | #load @"..\Daxif\_Config.fsx"
3 |
4 |
5 | open System
6 | open System.Collections.Generic
7 | open System.Text
8 | open System.Text.RegularExpressions
9 | open System.IO
10 | open DG.Daxif.Modules
11 | open _Config
12 | open DG.Daxif.Common
13 | open Microsoft.Xrm.Sdk
14 | open Microsoft.Xrm.Sdk.Messages
15 | open Microsoft.Crm.Sdk.Messages
16 | open Microsoft.Xrm.Sdk.Query
17 |
18 | open Microsoft.Xrm.Sdk.Metadata
19 |
20 | (** Configuration *)
21 |
22 | let env = Env.prod
23 | let proxy = env.connect().GetProxy()
24 |
25 | let logicalName = "account"
26 | let attributesToMatch = [| "accountnumber" |]
27 |
28 |
29 | (** Logic *)
30 |
31 | let query = QueryExpression(logicalName)
32 | query.ColumnSet <- ColumnSet(attributesToMatch)
33 | query.Criteria <- FilterExpression(LogicalOperator.And)
34 | attributesToMatch |> Array.iter (fun a -> query.Criteria.AddCondition(a, ConditionOperator.NotNull))
35 |
36 | let dups =
37 | CrmDataHelper.retrieveMultiple proxy query
38 | |> Seq.groupBy (fun e ->
39 | attributesToMatch
40 | |> Array.map (fun a -> e.GetAttributeValue(a).ToString().Trim()))
41 | |> Seq.filter (fun group -> group |> snd |> Seq.length |> fun l -> l > 1)
42 | |> Array.ofSeq
43 |
44 |
45 |
46 | let writeFile () =
47 | File.WriteAllLines(sprintf "C:\Temp\%s_duplicates.txt" logicalName,
48 | dups |> Seq.map (fun (attrs,es) ->
49 | sprintf "%s: %d" (String.Join(",", attrs)) (es |> Seq.length)
50 | ))
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/CustomScripting/Helper/DeployHelper.Main.fsx:
--------------------------------------------------------------------------------
1 | namespace DeployHelper
2 |
3 | (**
4 | PluginsHelper
5 | *)
6 | #load "..\..\Daxif\_Config.fsx"
7 |
8 | (** Open libraries for use *)
9 | open System
10 | open DG.Daxif.Common
11 | open Microsoft.Xrm.Sdk
12 | open Microsoft.Xrm.Sdk.Query
13 | open Microsoft.Crm.Sdk.Messages
14 |
15 | module DeployHelper =
16 | open System.Text
17 |
18 | let outputfn format =
19 | printf "%A: " DateTime.Now
20 | printfn format
21 |
22 | let publishAll (env: DG.Daxif.Environment) =
23 | outputfn "==================================="
24 | outputfn "DeployHelper: Performing PublishAll"
25 | outputfn "==================================="
26 |
27 | outputfn "Connecting to CRM"
28 | let proxy = env.connect().GetProxy()
29 |
30 | outputfn "Publishing all customizations"
31 | proxy.Timeout <- new TimeSpan(0,59,0)
32 | CrmDataHelper.publishAll proxy
33 | outputfn "Done publishing all customizations!"
34 | outputfn "***********************************"
35 |
36 | let retrieve (env: DG.Daxif.Environment) logicalname guid =
37 | outputfn "==================================="
38 | outputfn "DeployHelper: Retrieve record "
39 | outputfn "==================================="
40 |
41 | outputfn "Connecting to CRM"
42 | let proxy = env.connect().GetProxy()
43 |
44 | outputfn "Retrieving record"
45 | let res = CrmDataHelper.retrieve proxy logicalname guid
46 | outputfn "Done retrieving the record!"
47 | outputfn "***********************************"
48 | res
49 |
50 | let getImportJob (env: DG.Daxif.Environment) guid =
51 | outputfn "==================================="
52 | outputfn "DeployHelper: Get ImportJob "
53 | outputfn "==================================="
54 |
55 | outputfn "Connecting to CRM"
56 | let proxy = env.connect().GetProxy()
57 |
58 | outputfn "Retrieving job"
59 | let req = new RetrieveFormattedImportJobResultsRequest()
60 | req.ImportJobId <- guid
61 | let resp = proxy.Execute(req) :?> RetrieveFormattedImportJobResultsResponse
62 | let xml = resp.FormattedResults
63 | let bytes = Encoding.UTF8.GetBytes(xml)
64 | let res = Encoding.UTF8.GetString(bytes)
65 | outputfn "Done retrieving the job!"
66 | outputfn "***********************************"
67 | res
68 |
69 | module DuplicateDetectionRules =
70 | let makePublishDupRuleRequest guid =
71 | let req = PublishDuplicateRuleRequest()
72 | req.DuplicateRuleId <- guid
73 | req :> OrganizationRequest
74 |
75 | let retrieveDR proxy =
76 | let f = FilterExpression()
77 | f.AddCondition
78 | (@"statecode", ConditionOperator.Equal, 0)
79 | f.AddCondition
80 | (@"statuscode", ConditionOperator.Equal, 0)
81 | let q = QueryExpression("duplicaterule")
82 | q.ColumnSet <- ColumnSet([|"duplicateruleid";"name"|])
83 | q.Criteria <- f
84 | CrmDataHelper.retrieveMultiple proxy q
85 |
86 | let publish (env: DG.Daxif.Environment) dupRules =
87 | outputfn "==================================="
88 | outputfn "DeployHelper: Publishing duplicate detection rules"
89 | outputfn "==================================="
90 | let proxy = env.connect().GetProxy()
91 | let drToPublish =
92 | dupRules
93 | |> Array.filter (snd >> Array.contains env.url)
94 | |> Array.map fst
95 |
96 | retrieveDR proxy
97 | |> Seq.filter (fun x -> drToPublish |> Array.contains (x.Attributes.["name"].ToString()))
98 | |> Array.ofSeq
99 | |> Array.map (fun x ->
100 | outputfn "Publishing rule '%s' " (x.Attributes.["name"].ToString())
101 | makePublishDupRuleRequest (Guid(x.Attributes.["duplicateruleid"].ToString())))
102 | |> CrmDataHelper.performAsBulk proxy
103 | |> Array.filter (fun x -> x.Fault = null)
104 | |> Array.length
105 | |> outputfn "Done publishing %d duplicate detection rules"
106 | outputfn "*************************************"
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/CustomScripting/Helper/DeployHelper.Playground.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | Test
3 | *)
4 | #load @"..\..\Daxif\_Config.fsx"
5 | #load @"DeployHelper.Main.fsx"
6 |
7 | module DeployHelper = DeployHelper.DeployHelper
8 |
9 | (** Open libraries for use *)
10 | open System
11 | open System.IO
12 | open _Config
13 |
14 |
15 | DeployHelper.publishAll Env.dev
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/CustomScripting/MissingDocumentLocation.fsx:
--------------------------------------------------------------------------------
1 | #load @"..\Daxif\_Config.fsx"
2 |
3 | open _Config
4 | open DG.Daxif.Common
5 | open Microsoft.Xrm.Sdk
6 | open Microsoft.Xrm.Sdk.Messages
7 | open Microsoft.Xrm.Sdk.Metadata
8 |
9 | let env = Env.test
10 | let proxy = env.connect().GetProxy()
11 |
12 | let req = RetrieveAllEntitiesRequest () in
13 | req.EntityFilters <- EntityFilters.Relationships;
14 | req.RetrieveAsIfPublished <- true;
15 | let resp = proxy.Execute req :?> RetrieveAllEntitiesResponse in
16 | resp.EntityMetadata
17 | |> Array.filter (fun em ->
18 | em.OneToManyRelationships
19 | // |> Array.iter (fun r -> printfn "%A" r.ReferencingEntity)
20 | |> Array.exists (fun r ->
21 | r.ReferencingEntity = "activitypointer" ||
22 | r.ReferencingEntity = "annotation") && not em.IsDocumentManagementEnabled.Value
23 | )
24 | |> Array.iter (fun em -> printfn "%A" em.LogicalName)
25 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/CustomScripting/RetrieveMultipleBulk.fsx:
--------------------------------------------------------------------------------
1 |
2 | #load @"..\Daxif\_Config.fsx"
3 |
4 |
5 | open System
6 | open System.Collections.Generic
7 | open System.Text
8 | open System.Text.RegularExpressions
9 | open DG.Daxif.Modules
10 | open _Config
11 | open DG.Daxif.Common
12 | open Microsoft.Xrm.Sdk
13 | open Microsoft.Xrm.Sdk.Messages
14 | open Microsoft.Crm.Sdk.Messages
15 | open Microsoft.Xrm.Sdk.Query
16 | open Microsoft.Xrm.Sdk.Metadata
17 |
18 | (** Configuration *)
19 |
20 | let env = Env.dev
21 | let proxy = env.connect().GetProxy()
22 |
23 | let guid = Guid("01AB2EA2-1653-E611-80F0-5065F38A3A41")
24 |
25 | let query = QueryExpression("sharepointdocumentlocation")
26 | //query.ColumnSet <- ColumnSet()
27 | query.Criteria <- FilterExpression()
28 | query.Criteria.AddCondition("regardingobjectid", ConditionOperator.Equal, guid)
29 |
30 | let queries =
31 | [|
32 | query
33 | |]
34 |
35 | let result = CrmDataHelper.bulkRetrieveMultiple proxy queries
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/CustomScripting/SetCurrencyIfMissing.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | Updates the exchange rate of found records by setting a money value on the entity to the same as it was previously
3 | *)
4 |
5 | #load @"..\Daxif\_Config.fsx"
6 |
7 | #r @"..\..\BusinessDomain\bin\Debug\Microsoft.Xrm.Sdk.dll"
8 | #r @"..\..\BusinessDomain\bin\Debug\Microsoft.Crm.Sdk.Proxy.dll"
9 | #r @"..\..\BusinessDomain\bin\Debug\Delegate.XrmFramework.BusinessDomain.dll"
10 | open DG.XrmFramework.BusinessDomain.ServiceContext
11 |
12 | open System
13 | open System.IO
14 | open Microsoft.Xrm.Sdk
15 | open Microsoft.Crm.Sdk.Messages
16 |
17 | open _Config
18 | open DG.Daxif.Common
19 | open Microsoft.Xrm.Sdk.Messages
20 | open Microsoft.Xrm.Sdk.Query
21 |
22 |
23 | (** Configuration *)
24 | let entities =
25 | [| // logical names of entities
26 | |]
27 |
28 |
29 | let envs =
30 | [|
31 | Env.dev
32 | Env.test
33 | Env.prod
34 | |]
35 |
36 |
37 | (** Implementation *)
38 | let makeUpdateRequest transform (entity:Entity) =
39 | let updEntity = Entity(entity.LogicalName)
40 | updEntity.Id <- entity.Id
41 | transform entity updEntity
42 | let req = UpdateRequest()
43 | req.Target <- updEntity
44 | req :> OrganizationRequest
45 |
46 | let getDefaultCurrency proxy =
47 | let query = QueryExpression("organization")
48 | query.ColumnSet <- ColumnSet("basecurrencyid")
49 | query.TopCount <- Nullable(1)
50 |
51 | match CrmDataHelper.retrieveMultiple proxy query |> Seq.tryHead with
52 | | Some org -> org.GetAttributeValue("basecurrencyid")
53 | | None -> failwith "Unable to retrieve organization"
54 |
55 |
56 | let getRecords proxy logicalName =
57 | let query = QueryExpression(logicalName)
58 | query.ColumnSet <- ColumnSet("transactioncurrencyid")
59 | query.Criteria <- FilterExpression()
60 | query.Criteria.AddCondition("transactioncurrencyid", ConditionOperator.Null)
61 |
62 | CrmDataHelper.retrieveMultiple proxy query |> Array.ofSeq
63 |
64 |
65 | let main (env:DG.Daxif.Environment) =
66 | let proxy = env.connect().GetProxy()
67 | let baseCurrency = getDefaultCurrency proxy
68 | entities
69 | |> Array.map (getRecords proxy)
70 | |> Array.map (fun es ->
71 | printfn "Found %d entities that needs to be updated" (Seq.length es)
72 | es |> Seq.map (makeUpdateRequest (fun _ upd ->
73 | upd.Attributes.["transactioncurrencyid"] <- baseCurrency
74 | )))
75 | |> Seq.concat
76 | |> Array.ofSeq
77 | |> CrmDataHelper.performAsBulk proxy
78 | |> ignore
79 |
80 |
81 | ;;
82 | printfn ""
83 | printfn "Setting missing transactioncurrencyid fields.."
84 | printfn ""
85 | envs |> Array.Parallel.iter main
86 | printfn ""
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/CustomScripting/SetState.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | Deactive given views
3 | *)
4 |
5 | #load @"..\Daxif\_Config.fsx"
6 |
7 | #r @"..\..\BusinessDomain\bin\Debug\Microsoft.Xrm.Sdk.dll"
8 | #r @"..\..\BusinessDomain\bin\Debug\Microsoft.Crm.Sdk.Proxy.dll"
9 | #r @"..\..\BusinessDomain\bin\Debug\Delegate.XrmFramework.BusinessDomain.dll"
10 | open DG.XrmFramework.BusinessDomain.ServiceContext
11 |
12 | open System
13 | open System.IO
14 | open Microsoft.Xrm.Sdk
15 | open Microsoft.Crm.Sdk.Messages
16 |
17 | open _Config
18 | open DG.Daxif.Common
19 |
20 |
21 | (** Configuration *)
22 | let config =
23 | [|
24 | Account.EntityLogicalName, int(AccountState.Inactive), @"Accounts.csv"
25 | Contact.EntityLogicalName, int(ContactState.Inactive), @"Contacts.csv"
26 | |]
27 |
28 |
29 | let envs =
30 | [|
31 | // devEnv
32 |
33 | // Test
34 | // testEnv
35 |
36 | // Production
37 | // prodEnv
38 | |]
39 |
40 |
41 |
42 |
43 |
44 | (** Implementation *)
45 | let loadGuids path =
46 | File.ReadAllLines(Path.Combine(__SOURCE_DIRECTORY__, path))
47 | |> Array.map (fun s -> s.Trim(';'))
48 | |> Array.filter (fun s -> s.Length > 0)
49 |
50 | let makeDeactiveRequest logicalName state (guid:string) =
51 | let req = SetStateRequest()
52 | req.EntityMoniker <- EntityReference(logicalName, Guid(guid))
53 | req.State <- OptionSetValue(state)
54 | req.Status <- OptionSetValue(-1)
55 | req :> OrganizationRequest
56 |
57 | let main (env:DG.Daxif.Environment) =
58 | let proxy = env.connect().GetProxy()
59 | config
60 | |> Array.map (fun (logicalName, state, path) ->
61 | loadGuids path |> Array.map (makeDeactiveRequest logicalName state))
62 | |> Array.concat
63 | |> CrmDataHelper.performAsBulk proxy
64 | |> ignore
65 |
66 |
67 |
68 | ;;
69 | printfn ""
70 | printfn "Deactivating records in given environments.."
71 | printfn ""
72 | envs |> Array.Parallel.iter main
73 | printfn ""
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/CustomScripting/SimpleSolutionExportImport.fsx:
--------------------------------------------------------------------------------
1 |
2 | #load @"..\Daxif\_Config.fsx"
3 |
4 |
5 | open System
6 | open DG.Daxif.Modules
7 | open _Config
8 | open DG.Daxif.Common
9 | module cfg = DG.XrmOrg.XrmSolution.Config
10 |
11 |
12 | (** Configuration *)
13 | cfg.ensureFolder cfg.solutions
14 |
15 | let solution = "PluginDLL"
16 | let zip = cfg.solutions + solution + @".zip"
17 |
18 | let fromEnv = devEnv
19 |
20 | let toEnvs =
21 | [|
22 | // Test
23 | // testEnv
24 |
25 |
26 | // Production
27 | // prodEnv
28 |
29 | |]
30 | ;;
31 |
32 |
33 | (** Implementation *)
34 | Solution.export
35 | fromEnv.wsdl solution cfg.solutions false
36 | cfg.authType fromEnv.usr fromEnv.pwd fromEnv.dmn
37 | cfg.log
38 | ;;
39 |
40 | toEnvs
41 | |> Array.iter (fun (toEnv: Environment) ->
42 | Solution.import
43 | toEnv.wsdl solution zip false
44 | cfg.authType toEnv.usr toEnv.pwd toEnv.dmn
45 | cfg.log
46 |
47 | Solution.pluginSteps
48 | toEnv.wsdl solution true
49 | cfg.authType toEnv.usr toEnv.pwd toEnv.dmn
50 | cfg.log
51 | )
52 |
53 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/CustomScripting/TouchNames.fsx:
--------------------------------------------------------------------------------
1 |
2 | #load @"..\Daxif\_Config.fsx"
3 |
4 |
5 | open System
6 | open System.Collections.Generic
7 | open System.Text
8 | open System.Text.RegularExpressions
9 | open DG.Daxif.Modules
10 | open _Config
11 | open DG.Daxif.Common
12 | open Microsoft.Xrm.Sdk
13 | open Microsoft.Xrm.Sdk.Messages
14 | open Microsoft.Crm.Sdk.Messages
15 | open Microsoft.Xrm.Sdk.Query
16 | open Microsoft.Xrm.Sdk.Metadata
17 |
18 | (** Configuration *)
19 |
20 | let env = Env.prod
21 | let proxy = env.connect().GetProxy()
22 |
23 |
24 | let contactQuery = QueryExpression("contact")
25 | contactQuery.ColumnSet <- ColumnSet("firstname", "middlename", "lastname", "fullname")
26 |
27 | let userQuery = QueryExpression("systemuser")
28 | userQuery.ColumnSet <- ColumnSet("firstname", "middlename", "lastname", "fullname")
29 |
30 | let contacts () =
31 | CrmDataHelper.retrieveMultiple proxy contactQuery
32 | let users () =
33 | CrmDataHelper.retrieveMultiple proxy userQuery
34 |
35 |
36 | let updates =
37 | [ contacts() ]
38 | |> Seq.concat
39 | |> Seq.choose (fun e ->
40 | let fn = e.GetAttributeValue("fullname")
41 | if isNull fn || (fn.Contains(",") |> not) then None
42 | else
43 |
44 | let ne = Entity(e.LogicalName, e.Id)
45 | ne.["firstname"] <- e.GetAttributeValue("firstname") + " TEMP"
46 | ne.["middlename"] <- e.GetAttributeValue("middlename") + " TEMP"
47 | ne.["lastname"] <- e.GetAttributeValue("lastname") + " TEMP"
48 |
49 | let oe = Entity(e.LogicalName, e.Id)
50 | oe.["firstname"] <- e.GetAttributeValue("firstname")
51 | oe.["middlename"] <- e.GetAttributeValue("middlename")
52 | oe.["lastname"] <- e.GetAttributeValue("lastname")
53 |
54 | let req1 = UpdateRequest()
55 | req1.Target <- ne
56 | let req2 = UpdateRequest()
57 | req2.Target <- oe
58 |
59 | Some [req1 :> OrganizationRequest; req2 :> OrganizationRequest])
60 | |> Seq.concat
61 | |> Array.ofSeq
62 |
63 | let perform () =
64 | CrmDataHelper.performAsBulk proxy updates
65 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/CountEntities.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | Count entities
3 | *)
4 |
5 | #load @"_Config.fsx"
6 | open _Config
7 | open DG.Daxif
8 |
9 | Solution.Count(Env.dev, SolutionInfo.name)
10 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/DataExportSource.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | DataExportSource
3 | *)
4 | #load @"_Config.fsx"
5 | open _Config
6 | open DG.Daxif
7 |
8 | let entities =
9 | [|
10 | "account"
11 | "contact"
12 | |]
13 |
14 | Data.Export(Env.dev, entities, Path.Daxif.dataFolder)
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/DataImportTarget.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | DataImportTarget
3 | *)
4 |
5 | #load @"_Config.fsx"
6 | open _Config
7 | open DG.Daxif
8 |
9 | Data.Import(Env.test, Path.Daxif.dataFolder, serialize = Serialize.JSON)
10 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/GenerateCSharpContext.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | SolutionUpdateCustomContext
3 | *)
4 |
5 | #load @"_Config.fsx"
6 | open _Config
7 | open DG.Daxif
8 | open DG.Daxif.Common.Utility
9 |
10 | let xrmContext = Path.toolsFolder ++ @"XrmContext\XrmContext.exe"
11 | let businessDomain = Path.solutionRoot ++ @"BusinessDomain"
12 |
13 | Solution.GenerateCSharpContext(Env.dev, xrmContext, businessDomain,
14 | solutions = [
15 | SolutionInfo.name
16 | ],
17 | entities = [
18 | "savedquery"
19 | "account"
20 | "task"
21 | ],
22 | extraArguments = [
23 | "deprecatedprefix", "ZZ_"
24 | "labelMappings", "\u2714\uFE0F: checkmark, \u26D4\uFE0F: stopsign"
25 | ])
26 |
27 | let xrmMockupMetadataGen = Path.metdataFolder ++ "MetadataGenerator365.exe"
28 | Solution.GenerateXrmMockupMetadata(Env.dev, xrmMockupMetadataGen, Path.metdataFolder,
29 | solutions = [
30 | SolutionInfo.name
31 | ],
32 | entities = [
33 | "savedquery"
34 | "task"
35 | "account"
36 | "team"
37 | ],
38 | extraArguments = [
39 | ]
40 | )
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/GenerateTypeScriptContext.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | SolutionUpdateTsContext
3 | *)
4 |
5 | #load @"_Config.fsx"
6 | open _Config
7 | open DG.Daxif
8 | open DG.Daxif.Common.Utility
9 |
10 | let xrmDefinitelyTyped = Path.toolsFolder ++ @"XrmDefinitelyTyped\XrmDefinitelyTyped.exe"
11 | let xrmTypings = Path.webResourceProject ++ @"typings\XRM"
12 | let jsLib = Path.webResourceFolder ++ "lib"
13 |
14 | Solution.GenerateTypeScriptContext(Env.dev, xrmDefinitelyTyped, xrmTypings,
15 | solutions = [
16 | SolutionInfo.name
17 | ],
18 | entities = [
19 | // eg. "systemuser"
20 | "account"
21 | "contact"
22 | ],
23 | extraArguments = [
24 | "web", "XDT"
25 | "jsLib", jsLib
26 | "labelMappings", "\u2714\uFE0F: checkmark, \u26D4\uFE0F: stopsign"
27 | ])
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/Playground.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | Playground
3 | *)
4 |
5 | #load @"_Config.fsx"
6 | #r @"System.ServiceModel"
7 | open _Config
8 | open System
9 | open System.IO
10 | open System.Collections.Generic
11 | open Microsoft.Xrm.Sdk
12 | open Microsoft.Xrm.Sdk.Client
13 | open Microsoft.Xrm.Sdk.Messages
14 | open Microsoft.Xrm.Sdk.Query
15 |
16 | open DG.Daxif
17 | open DG.Daxif.Common
18 | open DG.Daxif.Common.Utility
19 |
20 |
21 | let proxy = Env.dev.connect().GetService()
22 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/PluginSyncDev.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | PluginSyncDev
3 | *)
4 |
5 | #load @"_Config.fsx"
6 | open _Config
7 | open DG.Daxif
8 | open DG.Daxif.Common.Utility
9 |
10 | let pluginProjFile = Path.solutionRoot ++ @"Plugins\Plugins.csproj"
11 | let pluginDll = Path.solutionRoot ++ @"Plugins\bin\Release\ILMerged.Delegate.XrmOrg.XrmSolution.Plugins.dll"
12 |
13 | Plugin.Sync(Env.dev, pluginDll, pluginProjFile, SolutionInfo.name)
14 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/PublishAllArg.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | SolutionPublishArg
3 | =================
4 |
5 | Configurable publish customization script, which is mainly intended for use by the build server.
6 |
7 | Arguments:
8 |
9 | * `env=` (required)
10 | *)
11 |
12 | #load @"_Config.fsx"
13 | open DG.Daxif
14 | open DG.Daxif.Common.Utility
15 |
16 | let args = fsi.CommandLineArgs |> parseArgs
17 |
18 | let env =
19 | match args |> tryFindArg ["env"; "e"] with
20 | | Some arg -> Environment.Get arg
21 | | None -> failwithf "Missing 'env' argument needed to execute this script."
22 |
23 | Solution.PublishAll(env)
24 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/SolutionCreateDev.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | SolutionCreateDev
3 | *)
4 |
5 | #load @"_Config.fsx"
6 | open _Config
7 | open DG.Daxif
8 |
9 | Solution.CreatePublisher(Env.dev, PublisherInfo.name, PublisherInfo.displayName, PublisherInfo.prefix)
10 |
11 | Solution.Create(Env.dev, SolutionInfo.name, SolutionInfo.displayName, PublisherInfo.prefix)
12 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/SolutionExportDev.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | SolutionExportDev
3 | *)
4 |
5 | #load @"_Config.fsx"
6 | open _Config
7 |
8 | open System
9 | open System.IO
10 | open DG.Daxif
11 | open DG.Daxif.Common.Utility
12 |
13 | // Get version increment from CLI if provided, default to Revision
14 | let versionIncrement =
15 | if fsi.CommandLineArgs.Length > 1 then getVersionIncrement fsi.CommandLineArgs.[1]
16 | else VersionIncrement.Revision
17 |
18 | // Ensure solution directory exists
19 | Directory.CreateDirectory(Path.Daxif.crmSolutionsFolder)
20 |
21 | // Update solution version
22 | Solution.UpdateVersionNumber(Env.dev, SolutionInfo.name, versionIncrement)
23 |
24 | // Export unmanaged
25 | Solution.Export(Env.dev, SolutionInfo.name, Path.Daxif.crmSolutionsFolder, managed = false, extended = true);;
26 |
27 | // Export managed
28 | Solution.Export(Env.dev, SolutionInfo.name, Path.Daxif.crmSolutionsFolder, managed = true, extended = true)
29 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/SolutionExtract.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | SolutionExtract
3 | *)
4 | #load @"_Config.fsx"
5 | open _Config
6 | open DG.Daxif
7 |
8 | Solution.Extract(
9 | Path.Daxif.unmanagedSolution,
10 | Path.SolutionPack.customizationsFolder,
11 | Path.SolutionPack.xmlMappingFile,
12 | Path.SolutionPack.projFile
13 | )
14 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/SolutionImportArg.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | SolutionImportArg
3 |
4 | Configurable import script, which is mainly intended for use by the build server.
5 |
6 | Arguments:
7 |
8 | * `env=` (required)
9 | * `dir=` (recommended for build server to point at artifacts)
10 | * `managed` (optional, defaults to unmanaged)
11 |
12 | For example:
13 |
14 | * Managed import to test : `fsi SolutionImportArg.fsx /env:Test /dir:"path/to/folder/with/solutions" managed`
15 | * Unmanaged import to dev: `fsi SolutionImportArg.fsx /env:Development`
16 | *)
17 |
18 | #load @"_Config.fsx"
19 | open _Config
20 | open DG.Daxif
21 | open DG.Daxif.Common.Utility
22 |
23 |
24 | let args = fsi.CommandLineArgs |> parseArgs
25 |
26 | let env =
27 | match args |> tryFindArg ["env"; "e"] with
28 | | Some arg -> Environment.Get arg
29 | | None -> failwithf "Missing 'env' argument needed to execute this script."
30 |
31 | let solutionFolder =
32 | args |> tryFindArg ["dir"; "d"] ?| Path.Daxif.crmSolutionsFolder
33 |
34 | let solutionZipPath =
35 | match args |> tryFindArg ["managed"] with
36 | | Some _ -> "_managed"
37 | | None -> ""
38 | |> sprintf "%s%s.zip" SolutionInfo.name
39 | |> (++) solutionFolder
40 |
41 |
42 | Solution.Import(env, solutionZipPath, activatePluginSteps = true, extended = true)
43 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/SolutionPack.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | SolutionPack
3 | *)
4 |
5 | #load @"_Config.fsx"
6 | open _Config
7 | open DG.Daxif
8 | open DG.Daxif.Common
9 | open DG.Daxif.Common.Utility
10 |
11 | // Unmanaged
12 | Solution.Pack(
13 | Utility.addEndingToFilename Path.Daxif.unmanagedSolution "_packed",
14 | Path.SolutionPack.customizationsFolder,
15 | Path.SolutionPack.xmlMappingFile,
16 | managed = false)
17 |
18 | // Managed
19 | Solution.Pack(
20 | Utility.addEndingToFilename Path.Daxif.managedSolution "_packed",
21 | Path.SolutionPack.customizationsFolder,
22 | Path.SolutionPack.xmlMappingFile,
23 | managed = true
24 | )
25 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/ViewExtender.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | View Extender
3 | *)
4 |
5 | #load @"_Config.fsx"
6 | open _Config
7 | open DG.Daxif
8 |
9 | View.GenerateFiles(Env.dev, Path.daxifRoot,
10 | solutions = [|
11 | SolutionInfo.name
12 | |],
13 | entities = [|
14 | // eg. "systemuser"
15 | |])
16 |
17 |
18 | #load @"viewExtenderData\_ViewGuids.fsx"
19 | #load @"viewExtenderData\_EntityRelationships.fsx"
20 | #load @"viewExtenderData\_EntityAttributes.fsx"
21 |
22 | open ViewGuids
23 | open EntityAttributes
24 | open EntityRelationships
25 |
26 | // define extensions e.g.:
27 | // Views.Account.MyParentView
28 | // |> View.Parse Env.dev
29 | // |> View.ChangeId Views.Account.FirstChildView
30 | // |> View.AddRelatedColumnFirst Account.Relations.Primarycontactid_ContactContactid [Contact.Fields.Address1_City] [400]
31 | // |> View.UpdateView Env.dev
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/WebResourceSyncDev.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | WebResouresSyncDev
3 | *)
4 |
5 | #load @"_Config.fsx"
6 | open _Config
7 | open DG.Daxif
8 | open DG.Daxif.Common.Utility
9 |
10 | WebResource.Sync(Env.dev, Path.webResourceFolder, SolutionInfo.name)
11 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/WorkflowSyncDev.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | WorkflowSyncDev
3 | *)
4 |
5 | #load @"_Config.fsx"
6 | open _Config
7 | open DG.Daxif
8 | open DG.Daxif.Common.Utility
9 |
10 | let workflowDll = Path.solutionRoot ++ @"Workflow\bin\Release\ILMerged.Delegate.XrmOrg.XrmSolution.Workflow.dll"
11 |
12 | Workflow.Sync(Env.dev, workflowDll, SolutionInfo.name)
13 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/_Config.fsx:
--------------------------------------------------------------------------------
1 | (**
2 | Sets up all the necessary variables and functions to be used for the other scripts.
3 | *)
4 | #r @"bin\Microsoft.Xrm.Sdk.dll"
5 | #r @"bin\Microsoft.Crm.Sdk.Proxy.dll"
6 | #r @"bin\Microsoft.IdentityModel.Clients.ActiveDirectory.dll"
7 | #r @"bin\Microsoft.Xrm.Tooling.Connector.dll"
8 | #r @"bin\Delegate.Daxif.dll"
9 | open System
10 | open Microsoft.Xrm.Sdk.Client
11 | open DG.Daxif
12 | open DG.Daxif.Common.Utility
13 |
14 | // Prompts the developer for a username and password the first time a script is run.
15 | // It then stores these credentials in a local .daxif-file.
16 | let creds = Credentials.FromKey("UserCreds")
17 |
18 | // If you want to store login credentials directly in code, instead of in a local file,
19 | // replace the above line with the following
20 | //let creds = Credentials.Create("usr", "pwd")
21 |
22 | module Env =
23 | let dev =
24 | Environment.Create(
25 | name = "Development",
26 | url = "https://mydev.crm4.dynamics.com/XRMServices/2011/Organization.svc",
27 | ap = AuthenticationProviderType.OnlineFederation,
28 | creds = creds,
29 | args = fsi.CommandLineArgs
30 | )
31 |
32 | let test =
33 | Environment.Create(
34 | name = "Test",
35 | url = "https://mytest.crm4.dynamics.com/XRMServices/2011/Organization.svc",
36 | ap = AuthenticationProviderType.OnlineFederation,
37 | creds = creds,
38 | args = fsi.CommandLineArgs
39 | )
40 |
41 | let prod =
42 | Environment.Create(
43 | name = "Production",
44 | url = "https://myprod.crm4.dynamics.com/XRMServices/2011/Organization.svc",
45 | ap = AuthenticationProviderType.OnlineFederation,
46 | creds = creds,
47 | args = fsi.CommandLineArgs
48 | )
49 |
50 |
51 | (**
52 | CRM Solution Setup
53 | ------------------
54 | *)
55 | module SolutionInfo =
56 | let name = @"XrmSolution"
57 | let displayName = @"XrmSolution"
58 |
59 | module PublisherInfo =
60 | let prefix = @"dg"
61 | let name = @"delegateas"
62 | let displayName = @"Delegate A/S"
63 |
64 |
65 | (**
66 | Path and project setup
67 | ----------------------
68 | *)
69 | Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
70 |
71 | module Path =
72 | let daxifRoot = __SOURCE_DIRECTORY__
73 | let solutionRoot = daxifRoot ++ @"..\.."
74 | let toolsFolder = daxifRoot ++ @".."
75 |
76 | let webResourceProject = solutionRoot ++ @"WebResources"
77 | let webResourceFolder =
78 | webResourceProject ++ @"src" ++ (sprintf "%s_%s" PublisherInfo.prefix SolutionInfo.name)
79 |
80 | let testProject = solutionRoot ++ @"Tests"
81 | let metdataFolder = testProject ++ @"Metadata"
82 |
83 | /// Path information used by the SolutionPackager scripts
84 | module SolutionPack =
85 | let projName = "SolutionBlueprint"
86 | let projFolder = solutionRoot ++ projName
87 | let xmlMappingFile = projFolder ++ (sprintf "%s.xml" SolutionInfo.name)
88 | let customizationsFolder = projFolder ++ @"customizations"
89 | let projFile = projFolder ++ (sprintf @"%s.csproj" projName)
90 |
91 | /// Paths Daxif uses to store/load files
92 | module Daxif =
93 | let crmSolutionsFolder = daxifRoot ++ "solutions"
94 | let unmanagedSolution = crmSolutionsFolder ++ (sprintf "%s.zip" SolutionInfo.name)
95 | let managedSolution = crmSolutionsFolder ++ (sprintf "%s_managed.zip" SolutionInfo.name)
96 |
97 | let translationsFolder = daxifRoot ++ "translations"
98 | let metadataFolder = daxifRoot ++ "metadata"
99 | let dataFolder = daxifRoot ++ "data"
100 | let stateFolder = daxifRoot ++ "state"
101 | let associationsFolder = daxifRoot ++ "associations"
102 | let mappingFolder = daxifRoot ++ "mapping"
103 | let importedFolder = daxifRoot ++ "imported"
104 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Delegate.Daxif.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Delegate.Daxif.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/FSharp.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/FSharp.Core.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.ApplicationInsights.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.ApplicationInsights.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.Crm.Sdk.Proxy.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.Crm.Sdk.Proxy.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.IdentityModel.Clients.ActiveDirectory.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.IdentityModel.Clients.ActiveDirectory.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.IdentityModel.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.IdentityModel.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.PowerApps.AppInsights.BatchedTelemetry.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.PowerApps.AppInsights.BatchedTelemetry.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.PowerApps.AppInsights.BatchedTelemetryChannel.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.PowerApps.AppInsights.BatchedTelemetryChannel.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.Rest.ClientRuntime.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.Rest.ClientRuntime.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.Xrm.Sdk.Deployment.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.Xrm.Sdk.Deployment.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.Xrm.Sdk.Workflow.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.Xrm.Sdk.Workflow.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.Xrm.Sdk.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.Xrm.Sdk.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.Xrm.Tooling.Connector.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Microsoft.Xrm.Tooling.Connector.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/SolutionPackagerLib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/SolutionPackagerLib.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/System.Diagnostics.DiagnosticSource.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/System.Diagnostics.DiagnosticSource.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/System.ValueTuple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/Daxif/bin/System.ValueTuple.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Delegate.XrmFramework.Scripts")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Delegate A/S")]
12 | [assembly: AssemblyProduct("Delegate.XrmFramework.Scripts")]
13 | [assembly: AssemblyCopyright("Copyright © Delegate A/S 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("80653734-1b42-4298-9b73-c421b50ab28b")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/FSharp.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/FSharp.Core.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.Crm.Sdk.Proxy.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.Crm.Sdk.Proxy.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.IdentityModel.Clients.ActiveDirectory.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.IdentityModel.Clients.ActiveDirectory.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.Rest.ClientRuntime.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.Rest.ClientRuntime.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.Xrm.Sdk.Deployment.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.Xrm.Sdk.Deployment.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.Xrm.Sdk.Workflow.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.Xrm.Sdk.Workflow.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.Xrm.Sdk.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.Xrm.Sdk.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.Xrm.Tooling.Connector.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Microsoft.Xrm.Tooling.Connector.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Run.fsx:
--------------------------------------------------------------------------------
1 | open System.Diagnostics
2 |
3 | let shellExecute program args =
4 | let startInfo = new ProcessStartInfo()
5 | startInfo.FileName <- program
6 | startInfo.Arguments <- args
7 | startInfo.UseShellExecute <- true
8 |
9 | let proc = Process.Start(startInfo)
10 | proc.WaitForExit()
11 | ()
12 |
13 | shellExecute (__SOURCE_DIRECTORY__ + "/XrmContext.exe") ""
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/Run.ps1:
--------------------------------------------------------------------------------
1 | .\XrmContext.exe
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/System.ValueTuple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/System.ValueTuple.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/XrmContext.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/XrmContext.exe
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmContext/XrmContext.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/FSharp.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/FSharp.Core.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.Crm.Sdk.Proxy.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.Crm.Sdk.Proxy.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.IdentityModel.Clients.ActiveDirectory.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.IdentityModel.Clients.ActiveDirectory.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.Rest.ClientRuntime.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.Rest.ClientRuntime.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.Xrm.Sdk.Deployment.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.Xrm.Sdk.Deployment.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.Xrm.Sdk.Workflow.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.Xrm.Sdk.Workflow.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.Xrm.Sdk.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.Xrm.Sdk.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.Xrm.Tooling.Connector.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Microsoft.Xrm.Tooling.Connector.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Run.fsx:
--------------------------------------------------------------------------------
1 | open System.Diagnostics
2 |
3 | let shellExecute program args =
4 | let startInfo = new ProcessStartInfo()
5 | startInfo.FileName <- program
6 | startInfo.Arguments <- args
7 | startInfo.UseShellExecute <- true
8 |
9 | let proc = Process.Start(startInfo)
10 | proc.WaitForExit()
11 | ()
12 |
13 | shellExecute (__SOURCE_DIRECTORY__ + "/XrmDefinitelyTyped.exe") ""
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/Run.ps1:
--------------------------------------------------------------------------------
1 | .\XrmDefinitelyTyped.exe
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/System.ValueTuple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/System.ValueTuple.dll
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/XrmDefinitelyTyped.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/delegateas/XrmFramework/9e8cf11e782b5ef1dcb91e214bd6385462c2a140/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/XrmDefinitelyTyped.exe
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/XrmDefinitelyTyped/XrmDefinitelyTyped.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/Tools/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/.eslintrc.js:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "@typescript-eslint/no-namespace": "off"
4 | }
5 | }
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/src/dg_XrmSolution/.gitignore:
--------------------------------------------------------------------------------
1 | *.js
2 | !lib/**
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/src/dg_XrmSolution/dg.account.ts:
--------------------------------------------------------------------------------
1 | namespace DG.Account {
2 | let formContext: Form.account.Main.Information;
3 |
4 | export function onLoad(context: Xrm.ExecutionContext) {
5 | formContext = context.getFormContext()
6 | // Attach onSave
7 | formContext.data.entity.addOnSave(onSave);
8 |
9 | // Attach onChange
10 | formContext.getAttribute("accountnumber").addOnChange(fooChange);
11 | }
12 |
13 | export function onSave() {
14 | // Do something ..
15 | }
16 |
17 | export function fooChange() {
18 | // Do something ..
19 | }
20 |
21 |
22 |
23 | /**
24 | * Big showcase of what XrmQuery is capable of
25 | */
26 | async function bigQueryExample() {
27 | let accounts =
28 | await XrmQuery.retrieveMultiple(x => x.accounts)
29 | .select(x => [x.name, x.emailaddress1])
30 | .expand(x => x.account_master_account, x => [x.name])
31 | .filter(x =>
32 | Filter.and(
33 | Filter.equals(x.address1_shippingmethodcode, account_address1_shippingmethodcode.Airborne),
34 | Filter.greaterThan(x.creditlimit, 1000))
35 | )
36 | .orderDesc(x => x.creditlimit)
37 | .top(5)
38 | .promise()
39 | }
40 | }
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": true,
3 | "compilerOptions": {
4 | "target": "es5",
5 | "noImplicitAny": false,
6 | "module": "none",
7 | "removeComments": true,
8 | "declaration": false,
9 | "sourceMap": false,
10 | "noEmitOnError": false,
11 | "strict": true,
12 | "lib": [ "dom", "es5", "es2015.promise", "es2015.iterable" ]
13 | },
14 | "include": [
15 | "**/*.ts"
16 | ]
17 | }
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Form/account/InteractionCentricDashboard/AccountsDashboard.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace Form.account.InteractionCentricDashboard {
2 | namespace AccountsDashboard {
3 | namespace Tabs {
4 | interface StreamsContainer extends Xrm.SectionCollectionBase {
5 | get(name: "Streams"): Xrm.PageSection;
6 | get(name: string): undefined;
7 | get(): Xrm.PageSection[];
8 | get(index: number): Xrm.PageSection;
9 | get(chooser: (item: Xrm.PageSection, index: number) => boolean): Xrm.PageSection[];
10 | }
11 | }
12 | interface Attributes extends Xrm.AttributeCollectionBase {
13 | get(name: string): undefined;
14 | get(): Xrm.Attribute[];
15 | get(index: number): Xrm.Attribute;
16 | get(chooser: (item: Xrm.Attribute, index: number) => boolean): Xrm.Attribute[];
17 | }
18 | interface Controls extends Xrm.ControlCollectionBase {
19 | get(name: "Component2316e00"): Xrm.SubGridControl<"account">;
20 | get(name: "Component666c4a4"): Xrm.SubGridControl<"account">;
21 | get(name: "Componentc4e86d7"): Xrm.SubGridControl<"account">;
22 | get(name: "Component{c25c1ba2-33b6-0760-d1cc-7621224bdaa7}"): Xrm.BaseControl;
23 | get(name: string): undefined;
24 | get(): Xrm.BaseControl[];
25 | get(index: number): Xrm.BaseControl;
26 | get(chooser: (item: Xrm.BaseControl, index: number) => boolean): Xrm.BaseControl[];
27 | }
28 | interface Tabs extends Xrm.TabCollectionBase {
29 | get(name: "StreamsContainer"): Xrm.PageTab;
30 | get(name: string): undefined;
31 | get(): Xrm.PageTab>[];
32 | get(index: number): Xrm.PageTab>;
33 | get(chooser: (item: Xrm.PageTab>, index: number) => boolean): Xrm.PageTab>[];
34 | }
35 | }
36 | interface AccountsDashboard extends Xrm.PageBase {
37 | getAttribute(attributeName: string): undefined;
38 | getControl(controlName: "Component2316e00"): Xrm.SubGridControl<"account">;
39 | getControl(controlName: "Component666c4a4"): Xrm.SubGridControl<"account">;
40 | getControl(controlName: "Componentc4e86d7"): Xrm.SubGridControl<"account">;
41 | getControl(controlName: "Component{c25c1ba2-33b6-0760-d1cc-7621224bdaa7}"): Xrm.BaseControl;
42 | getControl(controlName: string): undefined;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Form/account/Quick/AccountHierarchyTileForm.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace Form.account.Quick {
2 | namespace AccountHierarchyTileForm {
3 | namespace Tabs {
4 | interface hierarchy extends Xrm.SectionCollectionBase {
5 | get(name: "account tile"): Xrm.PageSection;
6 | get(name: string): undefined;
7 | get(): Xrm.PageSection[];
8 | get(index: number): Xrm.PageSection;
9 | get(chooser: (item: Xrm.PageSection, index: number) => boolean): Xrm.PageSection[];
10 | }
11 | }
12 | interface Attributes extends Xrm.AttributeCollectionBase {
13 | get(name: "opendeals"): Xrm.NumberAttribute;
14 | get(name: "openrevenue"): Xrm.NumberAttribute;
15 | get(name: "ownerid"): Xrm.LookupAttribute<"systemuser" | "team">;
16 | get(name: "primarycontactid"): Xrm.LookupAttribute<"contact">;
17 | get(name: string): undefined;
18 | get(): Xrm.Attribute[];
19 | get(index: number): Xrm.Attribute;
20 | get(chooser: (item: Xrm.Attribute, index: number) => boolean): Xrm.Attribute[];
21 | }
22 | interface Controls extends Xrm.ControlCollectionBase {
23 | get(name: "opendeals"): Xrm.NumberControl;
24 | get(name: "openrevenue"): Xrm.NumberControl;
25 | get(name: "ownerid"): Xrm.LookupControl<"systemuser" | "team">;
26 | get(name: "primarycontactid"): Xrm.LookupControl<"contact">;
27 | get(name: string): undefined;
28 | get(): Xrm.BaseControl[];
29 | get(index: number): Xrm.BaseControl;
30 | get(chooser: (item: Xrm.BaseControl, index: number) => boolean): Xrm.BaseControl[];
31 | }
32 | interface Tabs extends Xrm.TabCollectionBase {
33 | get(name: "hierarchy"): Xrm.PageTab;
34 | get(name: string): undefined;
35 | get(): Xrm.PageTab>[];
36 | get(index: number): Xrm.PageTab>;
37 | get(chooser: (item: Xrm.PageTab>, index: number) => boolean): Xrm.PageTab>[];
38 | }
39 | }
40 | interface AccountHierarchyTileForm extends Xrm.PageBase {
41 | getAttribute(attributeName: "opendeals"): Xrm.NumberAttribute;
42 | getAttribute(attributeName: "openrevenue"): Xrm.NumberAttribute;
43 | getAttribute(attributeName: "ownerid"): Xrm.LookupAttribute<"systemuser" | "team">;
44 | getAttribute(attributeName: "primarycontactid"): Xrm.LookupAttribute<"contact">;
45 | getAttribute(attributeName: string): undefined;
46 | getControl(controlName: "opendeals"): Xrm.NumberControl;
47 | getControl(controlName: "openrevenue"): Xrm.NumberControl;
48 | getControl(controlName: "ownerid"): Xrm.LookupControl<"systemuser" | "team">;
49 | getControl(controlName: "primarycontactid"): Xrm.LookupControl<"contact">;
50 | getControl(controlName: string): undefined;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Form/account/Quick/AccountSummaryCard.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace Form.account.Quick {
2 | namespace AccountSummaryCard {
3 | namespace Tabs {
4 | interface tab_1 extends Xrm.SectionCollectionBase {
5 | get(name: "tab_1_column_1_section_1"): Xrm.PageSection;
6 | get(name: string): undefined;
7 | get(): Xrm.PageSection[];
8 | get(index: number): Xrm.PageSection;
9 | get(chooser: (item: Xrm.PageSection, index: number) => boolean): Xrm.PageSection[];
10 | }
11 | }
12 | interface Attributes extends Xrm.AttributeCollectionBase {
13 | get(name: "address1_telephone1"): Xrm.Attribute;
14 | get(name: "emailaddress1"): Xrm.Attribute;
15 | get(name: "primarycontactid"): Xrm.LookupAttribute<"contact">;
16 | get(name: string): undefined;
17 | get(): Xrm.Attribute[];
18 | get(index: number): Xrm.Attribute;
19 | get(chooser: (item: Xrm.Attribute, index: number) => boolean): Xrm.Attribute[];
20 | }
21 | interface Controls extends Xrm.ControlCollectionBase {
22 | get(name: "address1_telephone1"): Xrm.StringControl;
23 | get(name: "emailaddress1"): Xrm.StringControl;
24 | get(name: "primarycontactid"): Xrm.LookupControl<"contact">;
25 | get(name: string): undefined;
26 | get(): Xrm.BaseControl[];
27 | get(index: number): Xrm.BaseControl;
28 | get(chooser: (item: Xrm.BaseControl, index: number) => boolean): Xrm.BaseControl[];
29 | }
30 | interface Tabs extends Xrm.TabCollectionBase {
31 | get(name: "tab_1"): Xrm.PageTab;
32 | get(name: string): undefined;
33 | get(): Xrm.PageTab>[];
34 | get(index: number): Xrm.PageTab>;
35 | get(chooser: (item: Xrm.PageTab>, index: number) => boolean): Xrm.PageTab>[];
36 | }
37 | }
38 | interface AccountSummaryCard extends Xrm.PageBase {
39 | getAttribute(attributeName: "address1_telephone1"): Xrm.Attribute;
40 | getAttribute(attributeName: "emailaddress1"): Xrm.Attribute;
41 | getAttribute(attributeName: "primarycontactid"): Xrm.LookupAttribute<"contact">;
42 | getAttribute(attributeName: string): undefined;
43 | getControl(controlName: "address1_telephone1"): Xrm.StringControl;
44 | getControl(controlName: "emailaddress1"): Xrm.StringControl;
45 | getControl(controlName: "primarycontactid"): Xrm.LookupControl<"contact">;
46 | getControl(controlName: string): undefined;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Form/account/Quick/AppforOutlookAccountCard.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace Form.account.Quick {
2 | namespace AppforOutlookAccountCard {
3 | namespace Tabs {
4 | interface tab_1 extends Xrm.SectionCollectionBase {
5 | get(name: "tab_1_column_1_section_1"): Xrm.PageSection;
6 | get(name: string): undefined;
7 | get(): Xrm.PageSection[];
8 | get(index: number): Xrm.PageSection;
9 | get(chooser: (item: Xrm.PageSection, index: number) => boolean): Xrm.PageSection[];
10 | }
11 | }
12 | interface Attributes extends Xrm.AttributeCollectionBase {
13 | get(name: "emailaddress1"): Xrm.Attribute;
14 | get(name: "primarycontactid"): Xrm.LookupAttribute<"contact">;
15 | get(name: "telephone1"): Xrm.Attribute;
16 | get(name: string): undefined;
17 | get(): Xrm.Attribute[];
18 | get(index: number): Xrm.Attribute;
19 | get(chooser: (item: Xrm.Attribute, index: number) => boolean): Xrm.Attribute[];
20 | }
21 | interface Controls extends Xrm.ControlCollectionBase {
22 | get(name: "emailaddress1"): Xrm.StringControl;
23 | get(name: "primarycontactid"): Xrm.LookupControl<"contact">;
24 | get(name: "telephone1"): Xrm.StringControl;
25 | get(name: string): undefined;
26 | get(): Xrm.BaseControl[];
27 | get(index: number): Xrm.BaseControl;
28 | get(chooser: (item: Xrm.BaseControl, index: number) => boolean): Xrm.BaseControl[];
29 | }
30 | interface Tabs extends Xrm.TabCollectionBase {
31 | get(name: "tab_1"): Xrm.PageTab;
32 | get(name: string): undefined;
33 | get(): Xrm.PageTab>[];
34 | get(index: number): Xrm.PageTab>;
35 | get(chooser: (item: Xrm.PageTab>, index: number) => boolean): Xrm.PageTab>[];
36 | }
37 | }
38 | interface AppforOutlookAccountCard extends Xrm.PageBase {
39 | getAttribute(attributeName: "emailaddress1"): Xrm.Attribute;
40 | getAttribute(attributeName: "primarycontactid"): Xrm.LookupAttribute<"contact">;
41 | getAttribute(attributeName: "telephone1"): Xrm.Attribute;
42 | getAttribute(attributeName: string): undefined;
43 | getControl(controlName: "emailaddress1"): Xrm.StringControl;
44 | getControl(controlName: "primarycontactid"): Xrm.LookupControl<"contact">;
45 | getControl(controlName: "telephone1"): Xrm.StringControl;
46 | getControl(controlName: string): undefined;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Form/account/Quick/AppforOutlookAccountQuickView.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace Form.account.Quick {
2 | namespace AppforOutlookAccountQuickView {
3 | namespace Tabs {
4 | interface tab_1 extends Xrm.SectionCollectionBase {
5 | get(name: "tab_1_column_1_section_1"): Xrm.PageSection;
6 | get(name: string): undefined;
7 | get(): Xrm.PageSection[];
8 | get(index: number): Xrm.PageSection;
9 | get(chooser: (item: Xrm.PageSection, index: number) => boolean): Xrm.PageSection[];
10 | }
11 | }
12 | interface Attributes extends Xrm.AttributeCollectionBase {
13 | get(name: string): undefined;
14 | get(): Xrm.Attribute[];
15 | get(index: number): Xrm.Attribute;
16 | get(chooser: (item: Xrm.Attribute, index: number) => boolean): Xrm.Attribute[];
17 | }
18 | interface Controls extends Xrm.ControlCollectionBase {
19 | get(name: "AppforOutlook_Accoount_QV_Subgrid_2"): Xrm.SubGridControl<"activitypointer">;
20 | get(name: "AppforOutlook_Account_QV_Subgrid_1"): Xrm.SubGridControl<"activitypointer">;
21 | get(name: "AppforOutlook_Account_QV_Subgrid_3"): Xrm.SubGridControl<"opportunity">;
22 | get(name: "AppforOutlook_Account_QV_Subgrid_4"): Xrm.SubGridControl<"incident">;
23 | get(name: string): undefined;
24 | get(): Xrm.BaseControl[];
25 | get(index: number): Xrm.BaseControl;
26 | get(chooser: (item: Xrm.BaseControl, index: number) => boolean): Xrm.BaseControl[];
27 | }
28 | interface Tabs extends Xrm.TabCollectionBase {
29 | get(name: "tab_1"): Xrm.PageTab;
30 | get(name: string): undefined;
31 | get(): Xrm.PageTab>[];
32 | get(index: number): Xrm.PageTab>;
33 | get(chooser: (item: Xrm.PageTab>, index: number) => boolean): Xrm.PageTab>[];
34 | }
35 | }
36 | interface AppforOutlookAccountQuickView extends Xrm.PageBase {
37 | getAttribute(attributeName: string): undefined;
38 | getControl(controlName: "AppforOutlook_Accoount_QV_Subgrid_2"): Xrm.SubGridControl<"activitypointer">;
39 | getControl(controlName: "AppforOutlook_Account_QV_Subgrid_1"): Xrm.SubGridControl<"activitypointer">;
40 | getControl(controlName: "AppforOutlook_Account_QV_Subgrid_3"): Xrm.SubGridControl<"opportunity">;
41 | getControl(controlName: "AppforOutlook_Account_QV_Subgrid_4"): Xrm.SubGridControl<"incident">;
42 | getControl(controlName: string): undefined;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Form/account/Quick/Information.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace Form.account.Quick {
2 | namespace Information {
3 | namespace Tabs {
4 | interface Information extends Xrm.SectionCollectionBase {
5 | get(name: "tab_1_column_1_section_1"): Xrm.PageSection;
6 | get(name: string): undefined;
7 | get(): Xrm.PageSection[];
8 | get(index: number): Xrm.PageSection;
9 | get(chooser: (item: Xrm.PageSection, index: number) => boolean): Xrm.PageSection[];
10 | }
11 | }
12 | interface Attributes extends Xrm.AttributeCollectionBase {
13 | get(name: "name"): Xrm.Attribute;
14 | get(name: string): undefined;
15 | get(): Xrm.Attribute[];
16 | get(index: number): Xrm.Attribute;
17 | get(chooser: (item: Xrm.Attribute, index: number) => boolean): Xrm.Attribute[];
18 | }
19 | interface Controls extends Xrm.ControlCollectionBase {
20 | get(name: "name"): Xrm.StringControl;
21 | get(name: string): undefined;
22 | get(): Xrm.BaseControl[];
23 | get(index: number): Xrm.BaseControl;
24 | get(chooser: (item: Xrm.BaseControl, index: number) => boolean): Xrm.BaseControl[];
25 | }
26 | interface Tabs extends Xrm.TabCollectionBase {
27 | get(name: "Information"): Xrm.PageTab;
28 | get(name: string): undefined;
29 | get(): Xrm.PageTab>[];
30 | get(index: number): Xrm.PageTab>;
31 | get(chooser: (item: Xrm.PageTab>, index: number) => boolean): Xrm.PageTab>[];
32 | }
33 | }
34 | interface Information extends Xrm.PageBase {
35 | getAttribute(attributeName: "name"): Xrm.Attribute;
36 | getAttribute(attributeName: string): undefined;
37 | getControl(controlName: "name"): Xrm.StringControl;
38 | getControl(controlName: string): undefined;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Form/account/Quick/RecentCasesandEntitlements.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace Form.account.Quick {
2 | namespace RecentCasesandEntitlements {
3 | namespace Tabs {
4 | interface general extends Xrm.SectionCollectionBase {
5 | get(name: "Cases"): Xrm.PageSection;
6 | get(name: "Entitlements"): Xrm.PageSection;
7 | get(name: string): undefined;
8 | get(): Xrm.PageSection[];
9 | get(index: number): Xrm.PageSection;
10 | get(chooser: (item: Xrm.PageSection, index: number) => boolean): Xrm.PageSection[];
11 | }
12 | }
13 | interface Attributes extends Xrm.AttributeCollectionBase {
14 | get(name: string): undefined;
15 | get(): Xrm.Attribute[];
16 | get(index: number): Xrm.Attribute;
17 | get(chooser: (item: Xrm.Attribute, index: number) => boolean): Xrm.Attribute[];
18 | }
19 | interface Controls extends Xrm.ControlCollectionBase {
20 | get(name: "accountcasessgrid"): Xrm.SubGridControl<"incident">;
21 | get(name: "subgrid_Entitlement"): Xrm.SubGridControl<"entitlement">;
22 | get(name: string): undefined;
23 | get(): Xrm.BaseControl[];
24 | get(index: number): Xrm.BaseControl;
25 | get(chooser: (item: Xrm.BaseControl, index: number) => boolean): Xrm.BaseControl[];
26 | }
27 | interface Tabs extends Xrm.TabCollectionBase {
28 | get(name: "general"): Xrm.PageTab;
29 | get(name: string): undefined;
30 | get(): Xrm.PageTab>[];
31 | get(index: number): Xrm.PageTab>;
32 | get(chooser: (item: Xrm.PageTab>, index: number) => boolean): Xrm.PageTab>[];
33 | }
34 | }
35 | interface RecentCasesandEntitlements extends Xrm.PageBase {
36 | getAttribute(attributeName: string): undefined;
37 | getControl(controlName: "accountcasessgrid"): Xrm.SubGridControl<"incident">;
38 | getControl(controlName: "subgrid_Entitlement"): Xrm.SubGridControl<"entitlement">;
39 | getControl(controlName: string): undefined;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Form/account/Quick/SocialProfiles.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace Form.account.Quick {
2 | namespace SocialProfiles {
3 | namespace Tabs {
4 | interface general extends Xrm.SectionCollectionBase {
5 | get(name: "SOCIALPROFILES"): Xrm.PageSection;
6 | get(name: string): undefined;
7 | get(): Xrm.PageSection[];
8 | get(index: number): Xrm.PageSection;
9 | get(chooser: (item: Xrm.PageSection, index: number) => boolean): Xrm.PageSection[];
10 | }
11 | }
12 | interface Attributes extends Xrm.AttributeCollectionBase {
13 | get(name: string): undefined;
14 | get(): Xrm.Attribute[];
15 | get(index: number): Xrm.Attribute;
16 | get(chooser: (item: Xrm.Attribute, index: number) => boolean): Xrm.Attribute[];
17 | }
18 | interface Controls extends Xrm.ControlCollectionBase {
19 | get(name: "subgrid_spaccount"): Xrm.SubGridControl<"socialprofile">;
20 | get(name: string): undefined;
21 | get(): Xrm.BaseControl[];
22 | get(index: number): Xrm.BaseControl;
23 | get(chooser: (item: Xrm.BaseControl, index: number) => boolean): Xrm.BaseControl[];
24 | }
25 | interface Tabs extends Xrm.TabCollectionBase {
26 | get(name: "general"): Xrm.PageTab;
27 | get(name: string): undefined;
28 | get(): Xrm.PageTab>[];
29 | get(index: number): Xrm.PageTab>;
30 | get(chooser: (item: Xrm.PageTab>, index: number) => boolean): Xrm.PageTab>[];
31 | }
32 | }
33 | interface SocialProfiles extends Xrm.PageBase {
34 | getAttribute(attributeName: string): undefined;
35 | getControl(controlName: "subgrid_spaccount"): Xrm.SubGridControl<"socialprofile">;
36 | getControl(controlName: string): undefined;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Form/account/Quick/accountcard.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace Form.account.Quick {
2 | namespace accountcard {
3 | namespace Tabs {
4 | interface general extends Xrm.SectionCollectionBase {
5 | get(name: "Cases"): Xrm.PageSection;
6 | get(name: "Entitlements"): Xrm.PageSection;
7 | get(name: "information"): Xrm.PageSection;
8 | get(name: string): undefined;
9 | get(): Xrm.PageSection[];
10 | get(index: number): Xrm.PageSection;
11 | get(chooser: (item: Xrm.PageSection, index: number) => boolean): Xrm.PageSection[];
12 | }
13 | }
14 | interface Attributes extends Xrm.AttributeCollectionBase {
15 | get(name: "emailaddress1"): Xrm.Attribute;
16 | get(name: "name"): Xrm.Attribute;
17 | get(name: "telephone1"): Xrm.Attribute;
18 | get(name: string): undefined;
19 | get(): Xrm.Attribute[];
20 | get(index: number): Xrm.Attribute;
21 | get(chooser: (item: Xrm.Attribute, index: number) => boolean): Xrm.Attribute[];
22 | }
23 | interface Controls extends Xrm.ControlCollectionBase {
24 | get(name: "accountcasessgrid"): Xrm.SubGridControl<"incident">;
25 | get(name: "emailaddress1"): Xrm.StringControl;
26 | get(name: "name"): Xrm.StringControl;
27 | get(name: "subgrid_Entitlement"): Xrm.SubGridControl<"entitlement">;
28 | get(name: "telephone1"): Xrm.StringControl;
29 | get(name: string): undefined;
30 | get(): Xrm.BaseControl[];
31 | get(index: number): Xrm.BaseControl;
32 | get(chooser: (item: Xrm.BaseControl, index: number) => boolean): Xrm.BaseControl[];
33 | }
34 | interface Tabs extends Xrm.TabCollectionBase {
35 | get(name: "general"): Xrm.PageTab;
36 | get(name: string): undefined;
37 | get(): Xrm.PageTab>[];
38 | get(index: number): Xrm.PageTab>;
39 | get(chooser: (item: Xrm.PageTab>, index: number) => boolean): Xrm.PageTab>[];
40 | }
41 | }
42 | interface accountcard extends Xrm.PageBase {
43 | getAttribute(attributeName: "emailaddress1"): Xrm.Attribute;
44 | getAttribute(attributeName: "name"): Xrm.Attribute;
45 | getAttribute(attributeName: "telephone1"): Xrm.Attribute;
46 | getAttribute(attributeName: string): undefined;
47 | getControl(controlName: "accountcasessgrid"): Xrm.SubGridControl<"incident">;
48 | getControl(controlName: "emailaddress1"): Xrm.StringControl;
49 | getControl(controlName: "name"): Xrm.StringControl;
50 | getControl(controlName: "subgrid_Entitlement"): Xrm.SubGridControl<"entitlement">;
51 | getControl(controlName: "telephone1"): Xrm.StringControl;
52 | getControl(controlName: string): undefined;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Form/account/QuickCreate/AccountQuickCreate.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace Form.account.QuickCreate {
2 | namespace AccountQuickCreate {
3 | namespace Tabs {
4 | interface tab_1 extends Xrm.SectionCollectionBase {
5 | get(name: "tab_1_column_1_section_1"): Xrm.PageSection;
6 | get(name: "tab_1_column_2_section_1"): Xrm.PageSection;
7 | get(name: "tab_1_column_3_section_1"): Xrm.PageSection;
8 | get(name: string): undefined;
9 | get(): Xrm.PageSection[];
10 | get(index: number): Xrm.PageSection;
11 | get(chooser: (item: Xrm.PageSection, index: number) => boolean): Xrm.PageSection[];
12 | }
13 | }
14 | interface Attributes extends Xrm.AttributeCollectionBase {
15 | get(name: "address1_city"): Xrm.Attribute;
16 | get(name: "address1_line1"): Xrm.Attribute;
17 | get(name: "address1_line2"): Xrm.Attribute;
18 | get(name: "address1_postalcode"): Xrm.Attribute;
19 | get(name: "description"): Xrm.Attribute;
20 | get(name: "name"): Xrm.Attribute;
21 | get(name: "numberofemployees"): Xrm.NumberAttribute;
22 | get(name: "primarycontactid"): Xrm.LookupAttribute<"contact">;
23 | get(name: "revenue"): Xrm.NumberAttribute;
24 | get(name: "telephone1"): Xrm.Attribute;
25 | get(name: string): undefined;
26 | get(): Xrm.Attribute[];
27 | get(index: number): Xrm.Attribute;
28 | get(chooser: (item: Xrm.Attribute, index: number) => boolean): Xrm.Attribute[];
29 | }
30 | interface Controls extends Xrm.ControlCollectionBase {
31 | get(name: "address1_city"): Xrm.StringControl;
32 | get(name: "address1_line1"): Xrm.StringControl;
33 | get(name: "address1_line2"): Xrm.StringControl;
34 | get(name: "address1_postalcode"): Xrm.StringControl;
35 | get(name: "description"): Xrm.StringControl;
36 | get(name: "name"): Xrm.StringControl;
37 | get(name: "numberofemployees"): Xrm.NumberControl;
38 | get(name: "primarycontactid"): Xrm.LookupControl<"contact">;
39 | get(name: "revenue"): Xrm.NumberControl;
40 | get(name: "telephone1"): Xrm.StringControl;
41 | get(name: string): undefined;
42 | get(): Xrm.BaseControl[];
43 | get(index: number): Xrm.BaseControl;
44 | get(chooser: (item: Xrm.BaseControl, index: number) => boolean): Xrm.BaseControl[];
45 | }
46 | interface Tabs extends Xrm.TabCollectionBase {
47 | get(name: "tab_1"): Xrm.PageTab;
48 | get(name: string): undefined;
49 | get(): Xrm.PageTab>[];
50 | get(index: number): Xrm.PageTab>;
51 | get(chooser: (item: Xrm.PageTab>, index: number) => boolean): Xrm.PageTab>[];
52 | }
53 | }
54 | interface AccountQuickCreate extends Xrm.PageBase {
55 | getAttribute(attributeName: "address1_city"): Xrm.Attribute;
56 | getAttribute(attributeName: "address1_line1"): Xrm.Attribute;
57 | getAttribute(attributeName: "address1_line2"): Xrm.Attribute;
58 | getAttribute(attributeName: "address1_postalcode"): Xrm.Attribute;
59 | getAttribute(attributeName: "description"): Xrm.Attribute;
60 | getAttribute(attributeName: "name"): Xrm.Attribute;
61 | getAttribute(attributeName: "numberofemployees"): Xrm.NumberAttribute;
62 | getAttribute(attributeName: "primarycontactid"): Xrm.LookupAttribute<"contact">;
63 | getAttribute(attributeName: "revenue"): Xrm.NumberAttribute;
64 | getAttribute(attributeName: "telephone1"): Xrm.Attribute;
65 | getAttribute(attributeName: string): undefined;
66 | getControl(controlName: "address1_city"): Xrm.StringControl;
67 | getControl(controlName: "address1_line1"): Xrm.StringControl;
68 | getControl(controlName: "address1_line2"): Xrm.StringControl;
69 | getControl(controlName: "address1_postalcode"): Xrm.StringControl;
70 | getControl(controlName: "description"): Xrm.StringControl;
71 | getControl(controlName: "name"): Xrm.StringControl;
72 | getControl(controlName: "numberofemployees"): Xrm.NumberControl;
73 | getControl(controlName: "primarycontactid"): Xrm.LookupControl<"contact">;
74 | getControl(controlName: "revenue"): Xrm.NumberControl;
75 | getControl(controlName: "telephone1"): Xrm.StringControl;
76 | getControl(controlName: string): undefined;
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Form/account/QuickCreate/Information.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace Form.account.QuickCreate {
2 | namespace Information {
3 | namespace Tabs {
4 | interface tab_1 extends Xrm.SectionCollectionBase {
5 | get(name: "tab_1_column_1_section_1"): Xrm.PageSection;
6 | get(name: "tab_1_column_2_section_1"): Xrm.PageSection;
7 | get(name: "tab_1_column_3_section_1"): Xrm.PageSection;
8 | get(name: string): undefined;
9 | get(): Xrm.PageSection[];
10 | get(index: number): Xrm.PageSection;
11 | get(chooser: (item: Xrm.PageSection, index: number) => boolean): Xrm.PageSection[];
12 | }
13 | }
14 | interface Attributes extends Xrm.AttributeCollectionBase {
15 | get(name: "address1_country"): Xrm.Attribute;
16 | get(name: "address1_county"): Xrm.Attribute;
17 | get(name: "address1_freighttermscode"): Xrm.OptionSetAttribute;
18 | get(name: string): undefined;
19 | get(): Xrm.Attribute[];
20 | get(index: number): Xrm.Attribute;
21 | get(chooser: (item: Xrm.Attribute, index: number) => boolean): Xrm.Attribute[];
22 | }
23 | interface Controls extends Xrm.ControlCollectionBase {
24 | get(name: "address1_country"): Xrm.StringControl;
25 | get(name: "address1_county"): Xrm.StringControl;
26 | get(name: "address1_freighttermscode"): Xrm.OptionSetControl;
27 | get(name: string): undefined;
28 | get(): Xrm.BaseControl[];
29 | get(index: number): Xrm.BaseControl;
30 | get(chooser: (item: Xrm.BaseControl, index: number) => boolean): Xrm.BaseControl[];
31 | }
32 | interface Tabs extends Xrm.TabCollectionBase {
33 | get(name: "tab_1"): Xrm.PageTab;
34 | get(name: string): undefined;
35 | get(): Xrm.PageTab>[];
36 | get(index: number): Xrm.PageTab>;
37 | get(chooser: (item: Xrm.PageTab>, index: number) => boolean): Xrm.PageTab>[];
38 | }
39 | }
40 | interface Information extends Xrm.PageBase {
41 | getAttribute(attributeName: "address1_country"): Xrm.Attribute;
42 | getAttribute(attributeName: "address1_county"): Xrm.Attribute;
43 | getAttribute(attributeName: "address1_freighttermscode"): Xrm.OptionSetAttribute;
44 | getAttribute(attributeName: string): undefined;
45 | getControl(controlName: "address1_country"): Xrm.StringControl;
46 | getControl(controlName: "address1_county"): Xrm.StringControl;
47 | getControl(controlName: "address1_freighttermscode"): Xrm.OptionSetControl;
48 | getControl(controlName: string): undefined;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Form/account/QuickCreate/Information1.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace Form.account.QuickCreate {
2 | namespace Information1 {
3 | namespace Tabs {
4 | interface tab_1 extends Xrm.SectionCollectionBase {
5 | get(name: "tab_1_column_1_section_1"): Xrm.PageSection;
6 | get(name: "tab_1_column_2_section_1"): Xrm.PageSection;
7 | get(name: "tab_1_column_3_section_1"): Xrm.PageSection;
8 | get(name: string): undefined;
9 | get(): Xrm.PageSection[];
10 | get(index: number): Xrm.PageSection;
11 | get(chooser: (item: Xrm.PageSection, index: number) => boolean): Xrm.PageSection[];
12 | }
13 | }
14 | interface Attributes extends Xrm.AttributeCollectionBase {
15 | get(name: "accountratingcode"): Xrm.OptionSetAttribute;
16 | get(name: "address1_fax"): Xrm.Attribute;
17 | get(name: "name"): Xrm.Attribute;
18 | get(name: string): undefined;
19 | get(): Xrm.Attribute[];
20 | get(index: number): Xrm.Attribute;
21 | get(chooser: (item: Xrm.Attribute, index: number) => boolean): Xrm.Attribute[];
22 | }
23 | interface Controls extends Xrm.ControlCollectionBase {
24 | get(name: "accountratingcode"): Xrm.OptionSetControl;
25 | get(name: "address1_fax"): Xrm.StringControl;
26 | get(name: "name"): Xrm.StringControl;
27 | get(name: string): undefined;
28 | get(): Xrm.BaseControl[];
29 | get(index: number): Xrm.BaseControl;
30 | get(chooser: (item: Xrm.BaseControl, index: number) => boolean): Xrm.BaseControl[];
31 | }
32 | interface Tabs extends Xrm.TabCollectionBase {
33 | get(name: "tab_1"): Xrm.PageTab;
34 | get(name: string): undefined;
35 | get(): Xrm.PageTab>[];
36 | get(index: number): Xrm.PageTab>;
37 | get(chooser: (item: Xrm.PageTab>, index: number) => boolean): Xrm.PageTab>[];
38 | }
39 | }
40 | interface Information1 extends Xrm.PageBase {
41 | getAttribute(attributeName: "accountratingcode"): Xrm.OptionSetAttribute;
42 | getAttribute(attributeName: "address1_fax"): Xrm.Attribute;
43 | getAttribute(attributeName: "name"): Xrm.Attribute;
44 | getAttribute(attributeName: string): undefined;
45 | getControl(controlName: "accountratingcode"): Xrm.OptionSetControl;
46 | getControl(controlName: "address1_fax"): Xrm.StringControl;
47 | getControl(controlName: "name"): Xrm.StringControl;
48 | getControl(controlName: string): undefined;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Form/systemuser/Main/ApplicationUser.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace Form.systemuser.Main {
2 | namespace ApplicationUser {
3 | namespace Tabs {
4 | interface SUMMARY_TAB extends Xrm.SectionCollectionBase {
5 | get(name: "onpremise account information"): Xrm.PageSection;
6 | get(name: "user information"): Xrm.PageSection;
7 | get(name: string): undefined;
8 | get(): Xrm.PageSection[];
9 | get(index: number): Xrm.PageSection;
10 | get(chooser: (item: Xrm.PageSection, index: number) => boolean): Xrm.PageSection[];
11 | }
12 | }
13 | interface Attributes extends Xrm.AttributeCollectionBase {
14 | get(name: "applicationid"): Xrm.Attribute;
15 | get(name: "applicationiduri"): Xrm.Attribute;
16 | get(name: "azureactivedirectoryobjectid"): Xrm.Attribute;
17 | get(name: "domainname"): Xrm.Attribute;
18 | get(name: "fullname"): Xrm.Attribute | null;
19 | get(name: "internalemailaddress"): Xrm.Attribute;
20 | get(name: "isdisabled"): Xrm.OptionSetAttribute;
21 | get(name: string): undefined;
22 | get(): Xrm.Attribute[];
23 | get(index: number): Xrm.Attribute;
24 | get(chooser: (item: Xrm.Attribute, index: number) => boolean): Xrm.Attribute[];
25 | }
26 | interface Controls extends Xrm.ControlCollectionBase {
27 | get(name: "applicationid"): Xrm.StringControl;
28 | get(name: "applicationiduri"): Xrm.StringControl;
29 | get(name: "azureactivedirectoryobjectid"): Xrm.StringControl;
30 | get(name: "domainname"): Xrm.StringControl;
31 | get(name: "footer_isdisabled"): Xrm.OptionSetControl;
32 | get(name: "fullname"): Xrm.StringControl | null;
33 | get(name: "internalemailaddress"): Xrm.StringControl;
34 | get(name: string): undefined;
35 | get(): Xrm.BaseControl[];
36 | get(index: number): Xrm.BaseControl;
37 | get(chooser: (item: Xrm.BaseControl, index: number) => boolean): Xrm.BaseControl[];
38 | }
39 | interface Tabs extends Xrm.TabCollectionBase {
40 | get(name: "SUMMARY_TAB"): Xrm.PageTab;
41 | get(name: string): undefined;
42 | get(): Xrm.PageTab>[];
43 | get(index: number): Xrm.PageTab>;
44 | get(chooser: (item: Xrm.PageTab>, index: number) => boolean): Xrm.PageTab>[];
45 | }
46 | }
47 | interface ApplicationUser extends Xrm.PageBase {
48 | getAttribute(attributeName: "applicationid"): Xrm.Attribute;
49 | getAttribute(attributeName: "applicationiduri"): Xrm.Attribute;
50 | getAttribute(attributeName: "azureactivedirectoryobjectid"): Xrm.Attribute;
51 | getAttribute(attributeName: "domainname"): Xrm.Attribute;
52 | getAttribute(attributeName: "fullname"): Xrm.Attribute | null;
53 | getAttribute(attributeName: "internalemailaddress"): Xrm.Attribute;
54 | getAttribute(attributeName: "isdisabled"): Xrm.OptionSetAttribute;
55 | getAttribute(attributeName: string): undefined;
56 | getControl(controlName: "applicationid"): Xrm.StringControl;
57 | getControl(controlName: "applicationiduri"): Xrm.StringControl;
58 | getControl(controlName: "azureactivedirectoryobjectid"): Xrm.StringControl;
59 | getControl(controlName: "domainname"): Xrm.StringControl;
60 | getControl(controlName: "footer_isdisabled"): Xrm.OptionSetControl;
61 | getControl(controlName: "fullname"): Xrm.StringControl | null;
62 | getControl(controlName: "internalemailaddress"): Xrm.StringControl;
63 | getControl(controlName: string): undefined;
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Form/systemuser/Quick/UserHierarchyTileForm.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace Form.systemuser.Quick {
2 | namespace UserHierarchyTileForm {
3 | namespace Tabs {
4 | interface hierarchy extends Xrm.SectionCollectionBase {
5 | get(name: "user tile"): Xrm.PageSection;
6 | get(name: string): undefined;
7 | get(): Xrm.PageSection[];
8 | get(index: number): Xrm.PageSection;
9 | get(chooser: (item: Xrm.PageSection, index: number) => boolean): Xrm.PageSection[];
10 | }
11 | }
12 | interface Attributes extends Xrm.AttributeCollectionBase {
13 | get(name: "businessunitid"): Xrm.LookupAttribute<"businessunit">;
14 | get(name: "fullname"): Xrm.Attribute | null;
15 | get(name: "internalemailaddress"): Xrm.Attribute;
16 | get(name: "mobilephone"): Xrm.Attribute;
17 | get(name: "title"): Xrm.Attribute;
18 | get(name: string): undefined;
19 | get(): Xrm.Attribute[];
20 | get(index: number): Xrm.Attribute;
21 | get(chooser: (item: Xrm.Attribute, index: number) => boolean): Xrm.Attribute[];
22 | }
23 | interface Controls extends Xrm.ControlCollectionBase {
24 | get(name: "businessunitid"): Xrm.LookupControl<"businessunit">;
25 | get(name: "fullname"): Xrm.StringControl | null;
26 | get(name: "internalemailaddress"): Xrm.StringControl;
27 | get(name: "mobilephone"): Xrm.StringControl;
28 | get(name: "title"): Xrm.StringControl;
29 | get(name: string): undefined;
30 | get(): Xrm.BaseControl[];
31 | get(index: number): Xrm.BaseControl;
32 | get(chooser: (item: Xrm.BaseControl, index: number) => boolean): Xrm.BaseControl[];
33 | }
34 | interface Tabs extends Xrm.TabCollectionBase {
35 | get(name: "hierarchy"): Xrm.PageTab;
36 | get(name: string): undefined;
37 | get(): Xrm.PageTab>[];
38 | get(index: number): Xrm.PageTab>;
39 | get(chooser: (item: Xrm.PageTab>, index: number) => boolean): Xrm.PageTab>[];
40 | }
41 | }
42 | interface UserHierarchyTileForm extends Xrm.PageBase {
43 | getAttribute(attributeName: "businessunitid"): Xrm.LookupAttribute<"businessunit">;
44 | getAttribute(attributeName: "fullname"): Xrm.Attribute | null;
45 | getAttribute(attributeName: "internalemailaddress"): Xrm.Attribute;
46 | getAttribute(attributeName: "mobilephone"): Xrm.Attribute;
47 | getAttribute(attributeName: "title"): Xrm.Attribute;
48 | getAttribute(attributeName: string): undefined;
49 | getControl(controlName: "businessunitid"): Xrm.LookupControl<"businessunit">;
50 | getControl(controlName: "fullname"): Xrm.StringControl | null;
51 | getControl(controlName: "internalemailaddress"): Xrm.StringControl;
52 | getControl(controlName: "mobilephone"): Xrm.StringControl;
53 | getControl(controlName: "title"): Xrm.StringControl;
54 | getControl(controlName: string): undefined;
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Web/dg_account_account.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace XDT {
2 | interface dg_account_account_Base extends WebEntity {
3 | accountidone?: string | null;
4 | accountidtwo?: string | null;
5 | dg_account_accountid?: string | null;
6 | versionnumber?: number | null;
7 | }
8 | interface dg_account_account_Relationships {
9 | dg_account_account?: Account_Result[] | null;
10 | }
11 | interface dg_account_account extends dg_account_account_Base, dg_account_account_Relationships {
12 | }
13 | interface dg_account_account_Create extends dg_account_account {
14 | }
15 | interface dg_account_account_Update extends dg_account_account {
16 | }
17 | interface dg_account_account_Select {
18 | accountidone: WebAttribute;
19 | accountidtwo: WebAttribute;
20 | dg_account_accountid: WebAttribute;
21 | versionnumber: WebAttribute;
22 | }
23 | interface dg_account_account_Filter {
24 | accountidone: XQW.Guid;
25 | accountidtwo: XQW.Guid;
26 | dg_account_accountid: XQW.Guid;
27 | versionnumber: number;
28 | }
29 | interface dg_account_account_Expand {
30 | dg_account_account: WebExpand;
31 | }
32 | interface dg_account_account_FormattedResult {
33 | }
34 | interface dg_account_account_Result extends dg_account_account_Base, dg_account_account_Relationships {
35 | "@odata.etag": string;
36 | }
37 | interface dg_account_account_RelatedOne {
38 | }
39 | interface dg_account_account_RelatedMany {
40 | dg_account_account: WebMappingRetrieve;
41 | }
42 | }
43 | interface WebEntitiesRetrieve {
44 | dg_account_accountset: WebMappingRetrieve;
45 | }
46 | interface WebEntitiesRelated {
47 | dg_account_accountset: WebMappingRelated;
48 | }
49 | interface WebEntitiesCUDA {
50 | dg_account_accountset: WebMappingCUDA;
51 | }
52 |
--------------------------------------------------------------------------------
/XrmOrg/XrmOrg.XrmSolution/WebResources/typings/XRM/Web/dg_account_contact.d.ts:
--------------------------------------------------------------------------------
1 | declare namespace XDT {
2 | interface dg_account_contact_Base extends WebEntity {
3 | accountid?: string | null;
4 | contactid?: string | null;
5 | dg_account_contactid?: string | null;
6 | versionnumber?: number | null;
7 | }
8 | interface dg_account_contact_Relationships {
9 | dg_account_contact?: Contact_Result[] | null;
10 | }
11 | interface dg_account_contact extends dg_account_contact_Base, dg_account_contact_Relationships {
12 | }
13 | interface dg_account_contact_Create extends dg_account_contact {
14 | }
15 | interface dg_account_contact_Update extends dg_account_contact {
16 | }
17 | interface dg_account_contact_Select {
18 | accountid: WebAttribute;
19 | contactid: WebAttribute;
20 | dg_account_contactid: WebAttribute;
21 | versionnumber: WebAttribute;
22 | }
23 | interface dg_account_contact_Filter {
24 | accountid: XQW.Guid;
25 | contactid: XQW.Guid;
26 | dg_account_contactid: XQW.Guid;
27 | versionnumber: number;
28 | }
29 | interface dg_account_contact_Expand {
30 | dg_account_contact: WebExpand;
31 | }
32 | interface dg_account_contact_FormattedResult {
33 | }
34 | interface dg_account_contact_Result extends dg_account_contact_Base, dg_account_contact_Relationships {
35 | "@odata.etag": string;
36 | }
37 | interface dg_account_contact_RelatedOne {
38 | }
39 | interface dg_account_contact_RelatedMany {
40 | dg_account_contact: WebMappingRetrieve;
41 | }
42 | }
43 | interface WebEntitiesRetrieve {
44 | dg_account_contactset: WebMappingRetrieve;
45 | }
46 | interface WebEntitiesRelated {
47 | dg_account_contactset: WebMappingRelated;
48 | }
49 | interface WebEntitiesCUDA {
50 | dg_account_contactset: WebMappingCUDA