-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- New feature: Delete Option Value
- Loading branch information
Demian Adolfo Raschkovan
committed
Apr 9, 2017
1 parent
45672c1
commit 173bf2a
Showing
23 changed files
with
145 additions
and
9 deletions.
There are no files selected for viewing
Binary file not shown.
97 changes: 97 additions & 0 deletions
97
msdyncrmWorkflowTools/msdyncrmWorkflowTools/Class/DeleteOptionValue.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Activities; | ||
using Microsoft.Xrm.Sdk; | ||
using Microsoft.Xrm.Sdk.Workflow; | ||
using Microsoft.Crm.Sdk.Messages; | ||
using Microsoft.Xrm.Sdk.Metadata.Query; | ||
using Microsoft.Xrm.Sdk.Query; | ||
using Microsoft.Xrm.Sdk.Messages; | ||
using Microsoft.Xrm.Sdk.Metadata; | ||
using msdyncrmWorkflowTools; | ||
using System.ServiceModel; | ||
|
||
namespace msdyncrmWorkflowTools | ||
{ | ||
|
||
|
||
public class DeleteOptionValue : CodeActivity | ||
{ | ||
|
||
#region "Parameter Definition" | ||
|
||
[RequiredArgument] | ||
[Input("Global Option Set")] | ||
[Default("false")] | ||
public InArgument<bool> GlobalOptionSet { get; set; } | ||
|
||
[RequiredArgument] | ||
[Input("Attribute Name")] | ||
[Default("")] | ||
public InArgument<String> AttributeName { get; set; } | ||
|
||
[Input("Entity Name")] | ||
[Default("")] | ||
public InArgument<String> EntityName { get; set; } | ||
|
||
|
||
[RequiredArgument] | ||
[Input("Option Value")] | ||
[ReferenceTarget("")] | ||
public InArgument<int> OptionValue { get; set; } | ||
|
||
|
||
#endregion | ||
|
||
protected override void Execute(CodeActivityContext executionContext) | ||
{ | ||
|
||
#region "Load CRM Service from context" | ||
|
||
Common objCommon = new Common(executionContext); | ||
objCommon.tracingService.Trace("Load CRM Service from context --- OK"); | ||
#endregion | ||
|
||
#region "Read Parameters" | ||
bool _GlobalOptionSet = this.GlobalOptionSet.Get(executionContext); | ||
String _AttributeName = this.AttributeName.Get(executionContext); | ||
String _EntityName = this.EntityName.Get(executionContext); | ||
|
||
int _OptionValue = this.OptionValue.Get(executionContext); | ||
|
||
objCommon.tracingService.Trace("_AttributeName=" + _AttributeName + "--_EntityName=" + _EntityName ); | ||
#endregion | ||
|
||
|
||
#region "Insert Option Value" | ||
|
||
try | ||
{ | ||
msdyncrmWorkflowTools_Class commonClass = new msdyncrmWorkflowTools_Class(objCommon.service); | ||
commonClass.DeleteOptionValue(_GlobalOptionSet,_AttributeName, _EntityName, _OptionValue); | ||
|
||
|
||
} | ||
catch (FaultException<OrganizationServiceFault> ex) | ||
{ | ||
objCommon.tracingService.Trace("Error : {0} - {1}", ex.Message, ex.StackTrace); | ||
//throw ex; | ||
// if (ex.Detail.ErrorCode != 2147220937)//ignore if the error is a duplicate insert | ||
//{ | ||
// throw ex; | ||
//} | ||
} | ||
catch (System.Exception ex) | ||
{ | ||
objCommon.tracingService.Trace("Error : {0} - {1}", ex.Message, ex.StackTrace); | ||
//throw ex; | ||
} | ||
#endregion | ||
|
||
} | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+1 KB
(100%)
msdyncrmWorkflowTools/msdyncrmWorkflowTools/bin/Debug/msdyncrmWorkflowTools.dll
Binary file not shown.
Binary file modified
BIN
+4 KB
(100%)
msdyncrmWorkflowTools/msdyncrmWorkflowTools/bin/Debug/msdyncrmWorkflowTools.pdb
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
msdyncrmWorkflowTools/msdyncrmWorkflowTools/obj/Debug/CoreCompileInputs.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
f4c0872ac7c863e2b5bc7543c774ea76e83eca2f | ||
a2266cdc8b173c07c81a9c6774cda9edad8bf22b |
Binary file modified
BIN
+1 KB
(100%)
msdyncrmWorkflowTools/msdyncrmWorkflowTools/obj/Debug/msdyncrmWorkflowTools.dll
Binary file not shown.
Binary file modified
BIN
+4 KB
(100%)
msdyncrmWorkflowTools/msdyncrmWorkflowTools/obj/Debug/msdyncrmWorkflowTools.pdb
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
msdyncrmWorkflowTools/msdyncrmWorkflowTools_Class/bin/Debug/msdyncrmWorkflowTools_Class.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
msdyncrmWorkflowTools/msdyncrmWorkflowTools_Class/bin/Debug/msdyncrmWorkflowTools_Class.pdb
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+20 KB
(1200%)
...lowTools_Class/obj/Debug/msdyncrmWorkflowTools_Class.csprojResolveAssemblyReference.cache
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
msdyncrmWorkflowTools/msdyncrmWorkflowTools_Class/obj/Debug/msdyncrmWorkflowTools_Class.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
msdyncrmWorkflowTools/msdyncrmWorkflowTools_Class/obj/Debug/msdyncrmWorkflowTools_Class.pdb
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
...WorkflowTools/msdyncrmWorkflowTools_ConsoleTest/bin/Debug/msdyncrmWorkflowTools_Class.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...WorkflowTools/msdyncrmWorkflowTools_ConsoleTest/bin/Debug/msdyncrmWorkflowTools_Class.pdb
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...owTools/msdyncrmWorkflowTools_ConsoleTest/bin/Debug/msdyncrmWorkflowTools_ConsoleTest.exe
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...owTools/msdyncrmWorkflowTools_ConsoleTest/bin/Debug/msdyncrmWorkflowTools_ConsoleTest.pdb
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...soleTest/obj/Debug/msdyncrmWorkflowTools_ConsoleTest.csprojResolveAssemblyReference.cache
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...owTools/msdyncrmWorkflowTools_ConsoleTest/obj/Debug/msdyncrmWorkflowTools_ConsoleTest.exe
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...owTools/msdyncrmWorkflowTools_ConsoleTest/obj/Debug/msdyncrmWorkflowTools_ConsoleTest.pdb
Binary file not shown.