You can use this SQL QUERY to find all the forms for the entities in your CRM database. If you keep having duplicate Quick Create or Information forms come up, you can just look at this and see which forms have duplicate Type forms.

SQL Query:
USE YOURORGHERE_MSCRM
SELECT form.Type, form.ObjectTypeCode, e.Name, form.Name, IsDefault, form.IsCustomizable, form.PublishedOn, form.IntroducedVersion
FROM SystemForm as form
INNER JOIN Entity e ON form.ObjectTypeCode = e.ObjectTypeCode
WHERE FormPresentation = 1 AND FormActivationState = 1 AND Form.CanBeDeleted = 1 AND form.IsManaged = 0 -- just get unmanaged ones
ORDER BY form.ObjectTypeCode DESC

Thought I’d chronicle the last few days of my PRK recovery journey here. I got it done at Icon in Lone Tree, CO, for $1,295 for both eyes. I chose PRK over Lasik because of the shaping of my eye making LASIK slightly riskier according to their pretty detailed analysis at the free consultation.

 

Day 1 Saturday

 

[This was written afterwards since I wanted to avoid the light of the screen and focusing my eyes too much on the day of the surgery, plus I was drugged out and wanted to sleep as much as possible because I had to get back to work writing code by Thursday].
The surgery itself was maybe 1/10 on the pain scale. I felt a stinging, burning sensation as they prepped my eye for the laser by dropping what looked like goop in my eye a couple times and rubbing it around with a mini brush. The laser itself took maybe 5 seconds on each eye. It’s not burning the eye, but it does have a similar smell when it’s actually lasering. I didn’t even notice when they put the contact on after it was all done. They were counting up the whole time for each stage, so I knew how long each little part would last. Continue Reading

If I can get one person to not sign up with CenturyLink Prism or internet, this post is worth it.

I have called CenturyLink over a dozen times in the last few months to get my bill adjusted. Spending somewhere between 10-14 hours on hold.  When first signing up for CenturyLink, I was promised a fair price ($75 for 40 mb up/40 mb down). This was to include the cheapest (and unwatchable, Standard Definition) Prism TV package. I then found out it’s more like 40/10, but they don’t specify this in any contract and I foolishly believed the salesman when he affirmed it was 40/40. I sucked it up, because I hated Comcast so much that I blindly thought nobody could be worse.  I was so wrong.
Continue Reading

Backstory:
I recently switched web hosts from Digital Ocean to OVH. I decided to go the Docker route and hopefully make migration less of a pain in the future. I run 4 websites off of the host, 3 of which are WordPress and 1 Koken site for photography. I don’t think it was less of a pain to do this, but I had to finish it once I started it.

Disclaimer:
I’m certain that this is NOT the optimal setup, but I could not find anyone who did this so hopefully it’s a jumping off point for someone with more patience and time than me. This is a waste of resources to have 3 separate WordPress Apache docker containers running simultaneously.

Intro:
I chose to run a separate docker container for each website, and use the popular nginx Docker reverse proxy to serve all of them out at different “VIRTUAL_HOST” s. They are not setup for HTTPS yet.
Continue Reading

Go directly to Customizations page in new window:
javascript:window.open($(‘#crmContentPanel iframe:not([style*=\”visibility: hidden\”])’)[0].contentWindow.Xrm.Page.context.getClientUrl() + “/tools/solution/edit.aspx?id=%7bfd140aaf-4df4-11dd-bd17-0019b9312238%7d#”);

Go to Solutions in new window:
javascript:window.open($(‘#crmContentPanel iframe:not([style*=\”visibility: hidden\”])’)[0].contentWindow.Xrm.Page.context.getClientUrl() + “/main.aspx?Origin=Portal&page=Settings&area=nav_solution”);

Go to Security in new window:
javascript:debugger;window.open($(‘#crmContentPanel iframe:not([style*=\”visibility: hidden\”])’)[0].contentWindow.Xrm.Page.context.getClientUrl() + “/tools/AdminSecurity/adminsecurity_area.aspx”);

Get a Solution’s Dependencies in new window (first open a Solution via Settings/Solutions/double-clicking a Solution):
javascript: try { var cont = frames[1] || frames[0]; window.open(cont.Xrm.Page.context.getClientUrl() + “/tools/dependency/dependencyviewdialog.aspx?objectid=” + cont.APP_SOLUTION_ID.substring(1,37) + “&objecttype=7100&operationtype=dependenciesforuninstall”); } catch (e) { if (console && console.log) { console.log(“Error occured: ” + e); }}

Get a Record’s ID from an open record:
javascript:var thisXrm; for (var i = 0; i<5; i++) { try {var wf = window.frames; if (wf[i] && wf[i].Xrm && wf[i].Xrm.Page && wf[i].Xrm.Page.data != null) {thisXrm = wf[0].Xrm; var id = thisXrm.Page.data.entity.getId(); if (id) { clipboardData.setData(“Text”, id.toString()); alert(id); } else { alert(‘No id yet!’); } }} catch (e) { }}

Get a form’s type code from an open record:
javascript: var typeCode = frames[0].Xrm.Page.context.getQueryStringParameters().etc; if (typeCode) { clipboardData.setData(“Text”, typeCode.toString()); alert(typeCode); }

Setting a value on a rollup field is impossible in JavaScript in CRM 2015. You can’t refresh the field individually without clicking the Refresh button — which can be a pain for users if you have several rollup fields to recalculate.

function setValueOnRollup(field, value) {
//unsupported way of putting a value in the calculated field
//DOES NOT update the value in CRM, only on the display
$('#' + field).find('.rollup').find('span')[0].textContent = value;
}

So if you wanted to use it on a form, put setValueOnRollup(‘yourfieldhere’, ‘100.00’)

It’s best used when you have the values you want to show (preferably the real values) which can be retrieved with a query you can make with CRM REST Builder (https://crmrestbuilder.codeplex.com/).

These also might come in handy to manage the rollups and processes:

Process.js – CRM 2013/2015 Call Action, Workflow, or Dialog from JavaScript (https://processjs.codeplex.com/) is a cool tool to run a process from your custom JavaScript.

Dynamics CRM 2016 Workflow Tools (https://msdyncrmworkflowtools.codeplex.com/), specifically the “Force Calculate Rollup Field” feature to update the value in CRM.

If you’ve ever had this error pop up when deleting a managed solution on your CRM 2015 box:

The Main() component cannot be deleted because it is referenced by 1 other components. For a list of referenced components, use the RetrieveDependenciesForDeleteRequest.

You should use this to quickly get the dependency information:

First, go to the solution’s URL (will be like https://CONTOSO.CO/COCO/tools/solution/edit.aspx?id=%7b2BE0D3AD-DF66-4747-8AA0-A5BA16B146D3%7d

Then run this bookmarklet, which I call GetSolutionDependencies:

javascript: try { var cont = frames[1] || frames[0]; window.open(cont.Xrm.Page.context.getClientUrl() + "/tools/dependency/dependencyviewdialog.aspx?objectid=" + cont.APP_SOLUTION_ID.substring(1,37) + "&objecttype=7100&operationtype=dependenciesforuninstall"); } catch (e) { if (console && console.log) { console.log("Error occured: " + e); }}

It will extract the id for that solution, then go to a page in your CRM org to show more details.  Only tested in IE11 so the context may differ of course.

I’ve been tinkering with Proxmox VE for holding my Linux NAS and media file server (OpenMediaVault [OMV]) in addition to some other Linux containers.  As OMV would be the only VM to access some of these disks I scoured the web for how to add a physical disk to a VM (http://forum.proxmox.com/archive/index.php/t-6192.html).

The problem with using /dev/sdX to pass through is that oftentimes the hard drives will change their X value (sometimes my primary will be on /dev/sda and othertimes /dev/sdg). 
Continue Reading

Here’s a little snippet I authored this morning, before my cup of coffee, to query the CRM SQL database (YourOrg_MSCRM) for a list of web resources in the order of last ModifiedOn:

select ModifiedOn, Name, DisplayName, OrganizationIdName, WebResourceType
from WebResource --table for web resources
where IsCustomizable = 1 -- just for custom web resources
order by ModifiedOn desc