“The content of the import file is not valid. You must select a text file” – Error on Solution Import in CRM 2015 (and earlier)


Hi,

We got this issue while importing (managed) solution from dev to test organization. We had recently deleted one of our existing 1 – n relationship and had created a new n – n relationship between those entities. The issue was that the new relationship had exactly the same schema name as the old relationship which we deleted.

The solution was to delete the newly created n – n relationship in Dev and create a new one with different schema name. After this change we were able to import the solution successfully.

Hope it helps..

Sample code to close a quote as won using WinQuoteRequest in CRM 2016 (and earlier)


Just sharing a sample code to close quote as won through C#


WinQuoteRequest winQuoteRequest = new WinQuoteRequest();
Entity quoteClose = new Entity("quoteclose");
quoteClose.Attributes["quoteid"] = new EntityReference("quote", new Guid("015816C2-2F10-E611-8112-3863BB353ED0"));
quoteClose.Attributes["subject"] = "Quote Close" + DateTime.Now.ToString();
winQuoteRequest.QuoteClose = quoteClose;
winQuoteRequest.Status = new OptionSetValue(-1);
organizationProxy.Execute(winQuoteRequest);

Hope it helps..

Using Rollup fields with Account Hierarchy in CRM 2015.


We recently had a requirement wherein we had one custom entity Financial Detail associated to Account as many to one relationship.

i.e. One account record can have multiple Financial Details records associated.

We had this field Total (currency) in Financial Detail entity of type currency.

The requirement was to have sum of Total of all related Financial Details records of the Account record plus of any Sub Accounts (child accounts up to n level).

It would have been painful if we had to implement the same using Plugin.

This we can achieve easily using Rollup Field in Account

Below is the definition of the Roll up field named Total Rollup

  • Set Hierarchy as Yes.
  • Select Financial Details as the related entity.
  • Filter based only Active records.
  • In Aggregation specify Sum of Total (currency field in Financial Details record).

 

Hope it helps.

Set PartyList field To in Email in CRM 2015 (and earlier)


Sample code to set the PartyList field for Email Activity.


function setContact() {

var partlistData = new Array();
partlistData[0] = new Object();

// guid of the record
partlistData[0].id = "8B2AD82B-30D6-E511-811F-3863BB356F90";

// name of the record
partlistData[0].name = "Hugh Grant";

// entity schema name
partlistData[0].entityType = "contact";
Xrm.Page.getAttribute("to").setValue(partlistData)

}

Hope it helps..

The selected translations file is either invalid or does not conform to the required translations file schema error while importing translations in CRM 2015 (and earlier)


Hi,

While importing translations we got the below error

On opening the CrmTranslations.xml we saw the translations missing for that row.

On specifying the values for those fields and importing it back fixed the issue.

Hope it helps..

Plugin on update of Quote Detail in CRM 2015 firing on Quote Create Issue.


Hi,

We were facing one issue recently on creating Quote, where in we were getting exception on our Plugin that was registered in Post Update of Quote Detail.

It was kind of surprise for us that why it was getting triggered.

We removed all our others plugin and workflow on Quote and Quote Line but still that plugin was getting triggered. So we thought of trying it out on Vanilla instance of CRM 2016. In case of CRM 2016 the plugin registered on Post Update of Quote Detail didn’t trigger.

We then tried it on Vanilla instance of CRM 2015 On Premise (no online available), and we saw the same case i.e. Plugin getting triggered.

We were getting the following detail on Context.ParentContext (in case where Plugin on Update of Post Quote Detail is asynchronous)

                     Message – Update

         Stage – 30

         EntityReference (Target) – Quote

For Synchronous the message will be Retrieve

Hope it helps..