forked from JoseFuentesDevAp/CRMSDKExample
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
88 lines (54 loc) · 2.83 KB
/
Program.cs
File metadata and controls
88 lines (54 loc) · 2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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
using Microsoft.PowerPlatform.Dataverse.Client;
ClientConfiguration clientConfiguration = ClientConfiguration.LoadFromXml(@"conf.xml");
SDKConnection sdkConnection = new SDKConnection(){
clientConfiguration = clientConfiguration
};
ServiceClient serviceClient = sdkConnection.CreateServiceClient();
// Inicializar handlers
AccountHandler accountHandler = new AccountHandler();
//CRMSDK.getAccountInfoExample(serviceClient, accountHandler);
//CRMSDK.createAccountExample(accountHandler, serviceClient);
//CRMSDK.updateAccountExample(accountHandler, serviceClient);
//CRMSDK.deleteAccountExample(accountHandler, serviceClient);
//CRMSDK.updateTelephoneByCountryCodeExample(accountHandler, serviceClient);
//CRMSDK.CreateAccountsBulk(accountHandler, serviceClient);
//CRMSDK.getAccountPerCountryExample(accountHandler, serviceClient);
//CREAR O ACTUALIZAR UNA CUENTA BÚSCANDOLA POR CÓDIGO
//CRMSDK.createOrUpdate(accountHandler, serviceClient);
//OBTENER REGISTROS MEDIANTE FETCHXML
//CRMSDK.getAccountByFetchXML(accountHandler, serviceClient);
//FILTRAR REGISTROS MEDIANTE FETCHXML
//CRMSDK.getAccountByERPCodeFetchXML(accountHandler, serviceClient);
//AGREGAR ENTIDADES RELACIONADAS EN FETCHXML
//CRMSDK.getAccountByERPCodeFetchXMLLink(accountHandler, serviceClient);
//AGREGAR CONDICIONES EN ENTIDADES RELACIONADAS EN FETCHXML
//CRMSDK.getAcountByCurrencyFetchLinkEntity(accountHandler, serviceClient);
// ========================================
// PRODUCT HANDLER EXAMPLES
// ========================================
ProductHandler productHandler = new ProductHandler();
//OBTENER INFORMACIÓN DE UN PRODUCTO
//CRMSDK.getProductInfoExample(serviceClient, productHandler);
//CREAR UN PRODUCTO
//CRMSDK.createProductExample(productHandler, serviceClient);
//ACTUALIZAR UN PRODUCTO
//CRMSDK.updateProductExample(productHandler, serviceClient);
//ELIMINAR UN PRODUCTO
//CRMSDK.deleteProductExample(productHandler, serviceClient);
//BUSCAR PRODUCTOS POR NOMBRE
//CRMSDK.getProductsByNameExample(productHandler, serviceClient);
//ACTUALIZAR DESCRIPCIÓN DE PRODUCTO
//CRMSDK.updateProductDescriptionExample(productHandler, serviceClient);
//CREAR PRODUCTOS EN MASIVO
//CRMSDK.CreateProductsBulk(productHandler, serviceClient);
//CREAR O ACTUALIZAR PRODUCTO POR NÚMERO
//CRMSDK.createOrUpdateProduct(productHandler, serviceClient);
//OBTENER PRODUCTOS MEDIANTE FETCHXML
//CRMSDK.getProductByFetchXML(productHandler, serviceClient);
//FILTRAR PRODUCTO POR NÚMERO CON FETCHXML
//CRMSDK.getProductByNumberFetchXML(productHandler, serviceClient);
//OBTENER PRODUCTO CON ENTIDADES RELACIONADAS (FETCHXML LINK-ENTITY)
//CRMSDK.getProductByNumberFetchXMLLink(productHandler, serviceClient);
//FILTRAR PRODUCTOS POR UOM SCHEDULE (FETCHXML CON LINK-ENTITY)
//CRMSDK.getProductsByUomScheduleFetchLinkEntity(productHandler, serviceClient);
Console.ReadLine();