cub-e.net

just coding...

Plug-in Yapici Metodlari

Bir plug-in için Microsoft Dynamics CRM’de opsiyonel olarak kullanabileceğiniz yapici metod(constructor) türleri mevcuttur. Hic parametre vermeden yapici metod cagirabileceginiz gibi bir ya da iki parametre vererek de cagirabilirsiniz.

SamplePlugin isimli plug-in için 3 cesit yapici metod ornegi asagidaki gibidir.

public SamplePlugin()

public SamplePlugin(string unsecure)


public SamplePlugin(string unsecure, string secure)


Yapici metodun ilk parametresi public yani unsecure bilgi yigini içermelidir. Ikinci parametre ise non-public (secure) bilgi yigini içermelidir. Buradan da anlayabileceğiniz uzere secure string encrypted yani sifrelenmis veri unsecure ise unencrypted yani sifrelenmemis değer içermelidir. Office Outlook client da calisan bir plug-in yazdiysaniz bilmelisiniz ki secure string offline yani cevrimdisi modda calismayacaktir.

Bu bilgileri bir plug-in’e Plugin Registration Tool vasitasiyla bir step’in kaydi sirasinda sisteme iletiyoruz. Bu mesajlar için ayrilmis 2 alan bulanmaktadır.

Step içerisinde bu ayarlamalari yaptıktan sonra yazmis olduğumuz degerlere kod içerisinden asagidaki gibi ulaşabilirsiniz.

private readonly string _unsecureString;

private readonly string _secureString;

 

public AdvancedPlugin(string unsecureString, string secureString)

{

    if (String.IsNullOrWhiteSpace(unsecureString) ||

          String.IsNullOrWhiteSpace(secureString))

    {

        throw new InvalidOperationException

             ("Unsecure and secure strings are required
               by the Advanced Plug-in, but not provided."
);

    }

 

    _unsecureString = unsecureString;

    _secureString = secureString;

}

Dynamics CRM 4.0 SDK ver. 4.0.4 (CRM SDK Versiyon 4.0.4 hazır)

Microsoft Dynamics CRM 4.0 SDK Versiyon 4.0.4 indirilmeye hazır. Bu versiyon çok fazla yenilik ve güncelleştirme içermekte. Detayları aşağıda bulabilirsiniz.

---

Version 4.0.4 of the Microsoft Dynamics CRM 4.0 SDK is now available for download! This version contains lots of great new and updated information:

· Offline Plug-in Security  - New information about the additional security restriction for an offline plug-in, which requires that a registry key named after the public key token of the plug-in assembly be added to the system registry. The online/offline plug-in sample code and walkthrough was updated too.

· Plug-in Constructor - Added a topic explaining how to write a constructor for a plug-in that accepts parameters. These strings can be used to pass information to the plug-in at run time.

· Privileges by Message – The appendix showing the required privileges for each message has been updated. There are a few outstanding messages that will be completed in the next SDK release.

· Outlook Sample Code and Programming Reference – The reference topics for the Microsoft.Crm.Outlook.Sdk assembly have been completed. Added new sample code that interacts with Microsoft Dynamics CRM for Microsoft Office Outlook using this assembly.

· Using the Discovery Service in Microsoft Dynamics CRM Live - Added a topic to show how to get the Web reference for Microsoft Dynamics CRM Live.

· SiteMap Sample Code - Added step-by-step instructions for how to change the label text in the navigation pane.

· Scripting Sample Code - Added a new scripting sample that allows you to control which users can update data in a field.

· Report Writers Guide - Added a new topics on linking reports, managing reports offline and new information about publishing reports.

· Other Sample Code 

    • How to Send a Bulk E-mail and Monitor the System Job
    • How to Start an Asynchronous Bulk Delete Job and Review Results
    • Using the BackgroundSendEmail Message
    • Using the QualifyMembersList Message

The online version of the SDK will be available within a few days, so check back to the Microsoft Dynamics CRM Developer Center later this week.