Skip to main content


Showing posts from 2009

Write In Products in Opportunity

If you know the typical MS CRM sales module flow, it starts from Lead and Customers and flows through Opportunity, Quote, Order and Invoice, You might have noticed there are Existing and WriteIn products in Quote/Order/Invoice but no so in Opportunity. This means we can not define write in products at the opportunity which can be pulled across when quote is generated out of it, and then this quote is subsequently converted to order and then invoice. There is a supported way to implement WriteIn products functionality in MS CRM, here is the technical approach; 1) Create a custom opportunity-writein-products entity just like quoteproducts,orderproducts entities (The basic difference I found between opportunityproduct and quoteproduct or orderproduct is that the relationship with products is a system required in case of the former while no constraint in the later two. 2) One you have created that custom opportunity-writein-products entity, it shall appear as link in left nav of opportunit

Resolve case programmatically

You have to create incidentresolution entity object and also then execute a CloseIncidentRequest, sample code looks like this: incidentresolution objJobResolution = new incidentresolution(); objJobResolution.incidentid = new Lookup(); objJobResolution.incidentid.type = "incident"; objJobResolution.incidentid.Value = ; // Job id objJobResolution.subject = "subject"; try { objCrmService.Create(objJobResolution); CloseIncidentRequest closeJob = new CloseIncidentRequest(); closeJob.IncidentResolution = objJobResolution; closeJob.Status = 5; CloseIncidentResponse resp = (CloseIncidentResponse)objCrmService.Execute(closeJob); } catch (System.Web.Services.Protocols.SoapException soapEx) { continue; }

Place Queue on other tabs

By default, Queue area is only available on the Workplace tab in MS CRM, sometimes it becomes a pain to go to workplace tab click on queue and then go back to the tab where you were. Here is a simple way to add Queue area on any tab or elsewhere, just update the sitemap or isv config and add the Queue area link to it, which is : http:// your server / organization name //workplace/home_workplace.aspx

Call MS CRM Service through Javascript to retrieve records

debugger;var gidLocationID = event.srcElement.DataValue[0].id; var xml = "" + " " + "\ " xmlns:xsi=\"\ " xmlns:xsd=\"\ ">" + " " + "\ ">" + " 00000000-0000-0000-0000-000000000000\">00000000-0000-0000-0000-000000000000 >" + " " + " " + " " + "\ ">" + "\ " xsi:type=\"q1:QueryExpression\">" + " **EntitySchemaname** " + " " + " " + " ** Attrbute Name 1** " + " >** Attrbute Na

Some useful URLs in MS CRM web client

Hi, These are some urls or paths you can make use of while creating custom applications integrated with Microsoft CRM New Note, related entity field is mandatory http://mscrm:5555/SaurinTestBase/notes/edit.aspx?pType=1 New Attachment http://mscrm:5555/SaurinTestBase/notes/edit.aspx?hideDesc=1&pType=1 Advanced Find http://mscrm:5555/SaurinTestBase/AdvancedFind/AdvFind.aspx

Import Subjects in MS CRM using Import tool

I got this problem of import of subject being successful but not appearing in the subject list, I googled to find out an important technique to do it: Original reference: When I import subjects, why don't they appear in the list of subjects? For imported subjects ( Categories used in a hierarchical list to correlate and organize information. Subjects are used in the subject tree to organize products, sales literature, and knowledge base articles. ) to be visible, the import source file must contain a column that maps to the Feature Mask attribute. The Feature Mask attribute determines whether the subject will be displayed in the subject tree. If Feature Mask is set to 1, the subject will be displayed. If it is empty or set to 0, the subject will not be displayed. To build the subject hierarchy in the subject tree, you map the column in the source file that contains the title of the parent subject to the Parent Sub

Last included in a Campaign field

Lead, Account and Contact entities have a field in the Administration tab of their entity forms which says : " Last Included in a campaign ", this read-only Datetime field autopopulates itself with the date when the lead/account/contact was last a part of any campaign.

Abort event through plugins

Suppose you are writing a pre -event plugin in which you compare to  old and new values and on certain condition would like to cancel the Save or  Update and stop the execution, it was simple in CRM 3 with an Abort() method while in CRM 4, you have to manually raise and throw a  Invalid-Plugin-Exception, while this gives a dirty error message on your MSCRM screen, you can make it better by entering you own Message explaining why the record could not be saved: throw new InvalidPluginExecutionException("Execution has been stopped due to this reason");

IME Mode in MSCRM attribute settings

When you create a new attribute for a MSCRM entity or open an exisitng one to see it's characteristics like data type, min-max values and schema name, you would have seen a property called IME mode, if you would've wondered what it is like me, here is what is got from the MSCRM Online resources :  An Input Method Editor (IME) lets you to enter and edit Chinese, Japanese, and Korean characters. These Asian writing systems have more characters than can be encoded for a regular keyboard. The IMEs for these languages use sequences of base characters that describe an individual character or group of characters to enter a larger set of characters. Base characters can be component letters from Hangul syllables, phonetic components for Japanese kanji characters, or various combinations for Chinese characters. You can use the IME mode option to quickly enter these characters and symbols into text boxes, avoiding the manual switch to IME mode that would otherwise be required. Input Metho

Retrieve custom entity and attributes by Microsoft.Crm 4 Sdk

CrmAuthenticationToken token = new CrmAuthenticationToken(); token.OrganizationName = " "; token.AuthenticationType = 0; Microsoft.Crm.SdkTypeProxy.CrmService service = new Microsoft.Crm.SdkTypeProxy.CrmService(); service.Url= "http://localhost:5555/mscrmservices/2007/crmservice.asmx"; service.CrmAuthenticationTokenValue = token; service.Credentials = System.Net.CredentialCache.DefaultCredentials; service.UnsafeAuthenticatedConnectionSharing = true;   Microsoft.Crm.Sdk.Query.QueryExpression query = new Microsoft.Crm.Sdk.Query.QueryExpression("mycustomentity"); query.ColumnSet.AddColumn("mycustomentityid"); query.ColumnSet.AddColumn("name"); query.ColumnSet.AddColumn("number"); query.Criteria.AddCondition("name", ConditionOperator.Equal, "Chandresh");   RetrieveMultipleRequest requestAccount = new RetrieveMultipleRequest(); requestAccount.Query = query; requestAccount.ReturnDy

Extra events in MS CRM entity form

When you want to make some updates in CRM on the entity form like set certain values or do some computation, two events you can rely on is onLoad and onSave. What if users don't want to press a button, say Save, especially in the case of a record of a related entity being added or created with the entity of which form you have opened, there is no way to track the updated in number of records being added or removed from the related entity, what you do then other than OnSave ?  Classic javascript has the answer, like any other webform, you get standard window events like onload,  onunload:  which is the event to be called when you close the window, i.e click on the rightmost cross button  [X]  at anytime, and also  onblur : which is when you move on the another window or just go to desktop loosing the focus of the active window which is the MS CRM form.   So you can run some javascript code on these events by defining a custom handler function for these events which would not be hand