Produced by Araxis Merge on 2/1/2017 2:56:52 PM Eastern Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | C:\Araxis_Merge_Comprasion\Pub_un\BTSSS_CIF_122016.zip\BTSSS_CIF_12_20_16\clean\CRM\trunk\SDK\SampleCode\CS\Process\CustomWorkflowActivities\CustomActivity | CustomActivity.cs | Tue Dec 20 19:51:45 2016 UTC |
| 2 | Wed Feb 1 19:56:52 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 0 | 0 |
| Removed | 1 | 74 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | // ======= ========== ========== ========== ========== ========== ========== == | |||||
| 2 | // This f ile is par t of the M icrosoft D ynamics CR M SDK code samples. | |||||
| 3 | // | |||||
| 4 | // Copyri ght (C) Mi crosoft Co rporation. All righ ts reserve d. | |||||
| 5 | // | |||||
| 6 | // This s ource code is intend ed only as a supplem ent to Mic rosoft | |||||
| 7 | // Develo pment Tool s and/or o n-line doc umentation . See the se other | |||||
| 8 | // materi als for de tailed inf ormation r egarding M icrosoft c ode sample s. | |||||
| 9 | // | |||||
| 10 | // THIS C ODE AND IN FORMATION ARE PROVID ED "AS IS" WITHOUT W ARRANTY OF ANY | |||||
| 11 | // KIND, EITHER EXP RESSED OR IMPLIED, I NCLUDING B UT NOT LIM ITED TO TH E | |||||
| 12 | // IMPLIE D WARRANTI ES OF MERC HANTABILIT Y AND/OR F ITNESS FOR A | |||||
| 13 | // PARTIC ULAR PURPO SE. | |||||
| 14 | // ======= ========== ========== ========== ========== ========== ========== == | |||||
| 15 | ||||||
| 16 | //<snippet CustomActi vity> | |||||
| 17 | using Syst em; | |||||
| 18 | using Syst em.Activit ies; | |||||
| 19 | ||||||
| 20 | // These n amespaces are found in the Mic rosoft.Xrm .Sdk.dll a ssembly | |||||
| 21 | // located in the SD K\bin fold er of the SDK downlo ad. | |||||
| 22 | using Micr osoft.Xrm. Sdk; | |||||
| 23 | ||||||
| 24 | // These n amespaces are found in the Mic rosoft.Xrm .Sdk.Workf low.dll as sembly | |||||
| 25 | // located in the SD K\bin fold er of the SDK downlo ad. | |||||
| 26 | using Micr osoft.Xrm. Sdk.Workfl ow; | |||||
| 27 | ||||||
| 28 | namespace Microsoft. Crm.Sdk.Sa mples | |||||
| 29 | { | |||||
| 30 | /// <s ummary> | |||||
| 31 | /// Cr eates a ta sk with a subject eq ual to the ID of the input ent ity. | |||||
| 32 | /// In put argume nts: | |||||
| 33 | /// "Input Ent ity". Type : EntityRe ference. I s the acco unt entity . | |||||
| 34 | /// Ou tput argum ent: | |||||
| 35 | /// "Task Crea ted". Type : EntityRe ference. I s the task created. | |||||
| 36 | /// </ summary> | |||||
| 37 | public sealed pa rtial clas s CustomAc tivity : C odeActivit y | |||||
| 38 | { | |||||
| 39 | // / <summary > | |||||
| 40 | // / Creates a task wit h a subjec t equal to the ID of the input EntityRef erence | |||||
| 41 | // / </summar y> | |||||
| 42 | pr otected ov erride voi d Execute( CodeActivi tyContext executionC ontext) | |||||
| 43 | { | |||||
| 44 | IWorkflo wContext c ontext = e xecutionCo ntext.GetE xtension<I WorkflowCo ntext>(); | |||||
| 45 | IOrganiz ationServi ceFactory serviceFac tory = | |||||
| 46 | exec utionConte xt.GetExte nsion<IOrg anizationS erviceFact ory>(); | |||||
| 47 | IOrganiz ationServi ce service = | |||||
| 48 | serv iceFactory .CreateOrg anizationS ervice(con text.UserI d); | |||||
| 49 | ||||||
| 50 | // Retri eve the id | |||||
| 51 | Guid acc ountId = t his.inputE ntity.Get( executionC ontext).Id ; | |||||
| 52 | ||||||
| 53 | // Creat e a task e ntity | |||||
| 54 | Entity t ask = new Entity(); | |||||
| 55 | task.Log icalName = "task"; | |||||
| 56 | task["su bject"] = accountId. ToString() ; | |||||
| 57 | task["re gardingobj ectid"] = new Entity Reference( "account", accountId ); | |||||
| 58 | Guid tas kId = serv ice.Create (task); | |||||
| 59 | this.tas kCreated.S et(executi onContext, | |||||
| 60 | new EntityRefe rence("tas k", taskId )); | |||||
| 61 | } | |||||
| 62 | ||||||
| 63 | // Define In put/Output Arguments | |||||
| 64 | [R equiredArg ument] | |||||
| 65 | [I nput("Inpu tEntity")] | |||||
| 66 | [R eferenceTa rget("acco unt")] | |||||
| 67 | pu blic InArg ument<Enti tyReferenc e> inputEn tity { get ; set; } | |||||
| 68 | ||||||
| 69 | [O utput("Tas kCreated") ] | |||||
| 70 | [R eferenceTa rget("task ")] | |||||
| 71 | pu blic OutAr gument<Ent ityReferen ce> taskCr eated { ge t; set; } | |||||
| 72 | } | |||||
| 73 | } | |||||
| 74 | //</snippe tCustomAct ivity> |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.