We can create Rollup Queries using CRM SDK (plugin or workflow or some external tool). In this entity, MS CRM provided similar to advance find capability for Query attribute, CRM stores it in database as ‘fetchxml’ attribute in fetch-XML (XML) format. Continue reading “Working with Goals – Rollup Query”
Its walk-through for deactivating all associated (1:N) records. Steps for that are
- Create plugin
- Register and create steps
Using Action we can trigger plugin, steps for that are …
Date-time conversion to local ….
Using the SOAP endpoint, you will always get a UTC date, to get into a local date on a client (assuming that the client has their datetime set correctly) use DateTime.ToLocalTime, but if you can’t guarentee the time zone settings then use ..
Attaching file in MS CRM through coding ,
Many times we needs to add different documents as an attachments to note, thus thought to share it ..
I explored, PDF, Word, Excel, Text file only, but i belive same code can be useful for other types of documents as well. Thus only Text file and PDF file complete function ahs been provided as an example and for rest only change of that document. That change belongs to “mimetype” only, rest part is same.
Word file : only change mimetype in below PDF code
// Set the type of attachment note.MimeType = @"application\ms-word";
Many times, during our MS CRM development we needs to interact with other application, we called it ‘integration’, we have multiple ways for it
- we can write stand alone application for it, which will interact both the application
- consume web service or open same for outside world etc …
First of all, make sure that provided sample SOAP is working fins with provided end points, so it will save your lots of efforts, you will get plenty of applications over the net. I used used one of it, you may use it by downloading it from here. This application looks like below,
Querying SQL database all the time may affect performance so some time we can pull the generic data and then query on that result collection may give better result.
Here is the example of it,
In MS CRM we have duplicate detection rule to detect duplicate entity records, but it will give you a simple popup (ref below screen), but it not stops you to create duplicate.
But many times we needs a hard stop for duplicate, we can achieve this by writing simple plugin, that will be reusable for any entity. Here is the sample of it
Note: I assuming that name is unique here. but it can modified with some other or more attributes