Removing the Calendar Icon from a MSCRM form - dynamics-crm-2011

I am working with some Date fields in Microsoft Dynamics CRM 2011 and want to get rid of the little calendar icon that brings up the date selector. This selector is just too unwieldy for use of dates more than a month old. Any thoughts on how to get rid of it?

Here's a couple ways (both require adding a JavaScript web resource and using the following code inside of a function which you register as the OnLoad event on the form):
1:
Xrm.Page.getControl('birthdate')._control._element.getElementsByTagName('img')[0].style['display'] = 'none';
2:
var controlID = 'birthdate';
// The icon has the 'img' string appended to the control ID
var imageID = controlID + 'img';
document.getElementById(imageID).style['display']='none';
If you want the input to take up the rest of the space you could hide the parent TD cell and then set the colSpan to 2 on the previous TD cell.
Feel free to add null checking ;)

Related

Calendar List View in SharePoint Server 2019

In SharePoint 2019 I create a calendar by going to: Settings Wheel > Add an app > Calendar
How can I then create a list view for the calendar? Can this be done by going to Calendar > Edit List, then creating a new view with the list view format? If so, how?
Or do you need to create a seperate page and add the calendar to that page as a web part, then edit that web part (or something similar)?
By list view I mean a vertical list of calendar items that span from today's date to 12 months in advance. However, I am less concerned with the specifics of the date range and more concerned with the basic how to. Thanks.
If you've been using Modern views and pages, the SharePoint calendar is likely very confusing because it still uses the "classic" view, even if the entire rest of your site is using the Modern UI.
Go open your calendar list to its default view.
In the upper left-hand corner, click on the small "Calendar" tab (see screenshot)
This will bring up the calendar "ribbon", and from there you have multiple View options to either edit the current view or create a new one (see screenshot)
For more details on List View creation, see https://support.office.com/en-us/article/create-change-or-delete-a-view-of-a-list-or-library-27ae65b8-bc5b-4949-b29b-4ee87144a9c9#OfficeVersion=2016,_2013,_2010 -- be sure to not actually look at the version of this page for SP2019, as it assumes you are editing a modern list.

NetSuite: Adding Available Filters to Portlet

I need to add 2 filters to a List Portlet. I have custom built code to display a report just the way we want it, however I want to add 2 available filters - Department (from a custom field) and Date (user wants to select what quarter).
I am aware how to add the nlobjSearchColumns array to the search results in the portlet script, but how can I add the ability for the user to select the values in the portlet?
How about creating a form Portlet where the user will first select the Department and Date values. Then when they click on submit, it will call a Suitelet that will return the search results.
Here is a sample code for the portlet. This is taken from NetSuite Help.
function demoSimpleFormPortlet(portlet, column)
{
portlet.setTitle('Simple Form Portlet')
var fld = portlet.addField('text','text','Text');
fld.setLayoutType('normal','startcol');
portlet.addField('integer','integer','Integer');
portlet.addField('date','date','Date');
var select = portlet.addField('fruit','select','Select');
select.addSelectOption('a','Oranges');
select.addSelectOption('b','Apples');
select.addSelectOption('c','Bananas');
portlet.addField('textarea','textarea','Textarea');
portlet.setSubmitButton(nlapiResolveURL('SUITELET','customscript_simpleformbackend', 'customdeploy_simpleform'),'Submit');
}

use custom pattern with picker in a dataTime field xPages

I am trying to add a dateTime edit box in an xPage and I would like to show the date and time
with a specific pattern that I define. The pattern is "MMM d, yyyy HH:mm". The date and time
appear in the desirable format when I open the xPage. The problem is caused when I select the checkbox "Use date/time picker pop-up". After this change, the time is not displayed correctly. It is always 00:00. Is this a bug? Or do I need to configure differently the edit box in order to use the pattern I want and be able to add a data/time picker properly?
Any help will be highly appreciated.
Thanks a lot for your time!
Yes, it's bug. I have reported it to IBM support.
You could use ExtLib Dojo Date and Time controls. There the problem is that there is a separate control for Date and Time and there is no built in way to save them in same item on document. You can do it with some SSJS though.
I have used a reqular Date/Time Edit Box ja ExtLib Dojo Time Text Box. The edit box is set to show date only and bound to my Date/Time field on datasource form. The Dojo Time Text Box gets its default value from the same Date/Time item on document.
In data source querySaveDocument event I have this code which adds the time to the date selected in date edit box:
// When time field is empty we get Java Date.
var dtDate:java.util.Date = getComponent("inpDT").getValue();
var dtTime = getComponent("djTime").getValue();
if (typeof dtTime == "lotus.domino.local.DateTime") dtTime = dtTime.toJavaDate()
// Combine date and time.
if (dtDate != null && dtTime != null) {
var dtDateTime:NotesDateTime = session.createDateTime(dtDate);
dtDateTime.setLocalTime(dtTime.getHour(), dtTime.getMinute(), 0, 0);
dominoDocument.replaceItemValue("DT", dtDateTime);
}

How to make a sharepoint list title show up as a default column value

I am trying to take a calendar title and let it show up as a default column value when someone tries to add a new event. Is there a way to do this within SharePoint, if so how?
Thank you for all the help.
Lucky
Quick solution >> When you change title of calendar, set Default value of that column as well.
Proper solution >> Create an event receiver for calendar and in ItemAdding event set value of title... should be like item["Title"] = item.ParentList.Title

Dynamics AX Color Picker

Trying to add a color picker to a field in Dynamics AX 2009. Found an article providing some very simple steps for creating the color picker as a lookup, but I can't get it to work.
When creating the extended data type, the FormHelp lookup doesn't include the function SysChooseColor, but it will accept the value if manually entered.
After adding a field using my color picker data type, the form renders a string edit to the page with a lookup icon. However, upon clicking the icon, the lookup window that appears is empty. Tried with and without a valid color value (#AAAAAA) in the field.
Here's the reference I started with: http://www.axaptapedia.com/Color_picker
Thanks
Did you look at form JmgParameters?
On tab DisplayOptions you can find example of usage the color lookup form. See at element.colorLookup() method.

Resources