Change Opportunity Date to Quarter info

Hello,

could you help me to convert MS CRM 4
Opportunity Estimate Close Date to Quarter info (and set quarter info to new 
field)
I'll do it on field onchange function.
sample :

2010.01.03 change to 2010Q1
2010.04.23 change to 2010Q2

So I need code for onchange funktion :)

B.I. 

0
aidikd (6)
12/17/2009 2:40:15 PM
crm 35858 articles. 1 followers. Follow

3 Replies
447 Views

Similar Articles

[PageSpeed] 33

On 17 Gru, 15:40, "B.I." <aid...@jdjdjd.lt> wrote:
> Hello,
>
> could you help me to convert MS CRM 4
> Opportunity Estimate Close Date to Quarter info (and set quarter info to new
> field)
> I'll do it on field onchange function.
> sample :
>
> 2010.01.03 change to 2010Q1
> 2010.04.23 change to 2010Q2
>
> So I need code for onchange funktion :)
>
> B.I.

Try this:

var estimatedclosedate = new Date();
estimatedclosedate = crmForm.all.estimatedclosedate.DataValue;
var y = getFullYear();
var m = getMonth();
var quarter  = y + "Q";
if (m == 0 || m == 1 || m == 2)
	quarter += "1";
else if (m == 3 || m == 4 || m == 5)
	quarter += "2";
else if (m == 6 || m == 7 || m == 8)
	quarter += "3";
else if (m == 9 || m == 10 || m == 11)
	quarter += "4";

crmForm.all.new_field.DataValue = quarter;


David Kolodziejczyk
http://en.team4crm.com
0
12/17/2009 10:08:35 PM
On 17 Gru, 23:08, Dawid Kolodziejczyk <dawid.kolodziejc...@gmail.com>
wrote:
> On 17 Gru, 15:40, "B.I." <aid...@jdjdjd.lt> wrote:
>
> > Hello,
>
> > could you help me to convert MS CRM 4
> > Opportunity Estimate Close Date to Quarter info (and set quarter info t=
o new
> > field)
> > I'll do it on field onchange function.
> > sample :
>
> > 2010.01.03 change to 2010Q1
> > 2010.04.23 change to 2010Q2
>
> > So I need code for onchange funktion :)
>
> > B.I.
>
> Try this:
>
> var estimatedclosedate =3D new Date();
> estimatedclosedate =3D crmForm.all.estimatedclosedate.DataValue;
> var y =3D getFullYear();
> var m =3D getMonth();
> var quarter =A0=3D y + "Q";
> if (m =3D=3D 0 || m =3D=3D 1 || m =3D=3D 2)
> =A0 =A0 =A0 =A0 quarter +=3D "1";
> else if (m =3D=3D 3 || m =3D=3D 4 || m =3D=3D 5)
> =A0 =A0 =A0 =A0 quarter +=3D "2";
> else if (m =3D=3D 6 || m =3D=3D 7 || m =3D=3D 8)
> =A0 =A0 =A0 =A0 quarter +=3D "3";
> else if (m =3D=3D 9 || m =3D=3D 10 || m =3D=3D 11)
> =A0 =A0 =A0 =A0 quarter +=3D "4";
>
> crmForm.all.new_field.DataValue =3D quarter;
>
> David Kolodziejczykhttp://en.team4crm.com


should be:
var y =3D estimatedclosedate.getFullYear();
var m =3D estimatedclosedate.getMonth();

0
12/17/2009 10:11:50 PM
Thanks it works :)

"Dawid Kolodziejczyk" <dawid.kolodziejczyk@gmail.com> wrote in message 
news:05ee9f66-65f9-4fd5-b9a8-3506f3a23993@m16g2000yqc.googlegroups.com...
> On 17 Gru, 23:08, Dawid Kolodziejczyk <dawid.kolodziejc...@gmail.com>
> wrote:
>> On 17 Gru, 15:40, "B.I." <aid...@jdjdjd.lt> wrote:
>>
>> > Hello,
>>
>> > could you help me to convert MS CRM 4
>> > Opportunity Estimate Close Date to Quarter info (and set quarter info 
>> > to new
>> > field)
>> > I'll do it on field onchange function.
>> > sample :
>>
>> > 2010.01.03 change to 2010Q1
>> > 2010.04.23 change to 2010Q2
>>
>> > So I need code for onchange funktion :)
>>
>> > B.I.
>>
>> Try this:
>>
>> var estimatedclosedate = new Date();
>> estimatedclosedate = crmForm.all.estimatedclosedate.DataValue;
>> var y = getFullYear();
>> var m = getMonth();
>> var quarter  = y + "Q";
>> if (m == 0 || m == 1 || m == 2)
>>         quarter += "1";
>> else if (m == 3 || m == 4 || m == 5)
>>         quarter += "2";
>> else if (m == 6 || m == 7 || m == 8)
>>         quarter += "3";
>> else if (m == 9 || m == 10 || m == 11)
>>         quarter += "4";
>>
>> crmForm.all.new_field.DataValue = quarter;
>>
>> David Kolodziejczykhttp://en.team4crm.com
>
>
> should be:
> var y = estimatedclosedate.getFullYear();
> var m = estimatedclosedate.getMonth();
> 
0
aidikd (6)
12/18/2009 8:59:52 AM
Reply:

Similar Artilces:

changing the xsi:type
I have an arraylist with up to 4 different classes that can be contained. e.g.... <carpark> <car /> <truck /> <motorcycle /> <rv /> </carpark> It's largely working. The output is:- <carpark> <anytype xsi:type="xmlcar" /> <anytype xsi:type="xmltruck" /> <anytype xsi:type="xmlmotorcycle" /> <anytype xsi:type="xmlrv" /> </carpark> I've tried changing the element name, the arrayitem name, but I can't get it to rename from "xmlcar" to ...

Using dates for x-axis values as string instead of creating a scale
I am creating a line graph where I want to identify each point on the graph by a date (i.e. the source of the x-axis is to a column full of dates). When I do this, excel puts the dates on a scale, so a lot of my data is bunched up in the center of the graph. Is there any way to format the dates as text for use in the graph without the text version of the dates being the unreadable number format? Or, is there any way to stop excel from putting my dates on a scale? Thanks! -Eleanor -- cs_weirdo You can change the axis back to a category type, instead of a time scale type. Choose Chart...

CRM - Sales Pipeline Report
Please help me - I am trying to get the Sales Pipeline report to order correctly on the Estimated Close date. My report formats correctly and I have set to Group by Date from the parent report of the sales pipeline - BUT - when I view the Sales Pipeline Detail report the Estimated Close date is all over the place... E.g. August opportunities following by December then November then October then September! I have spoken to one of my developers and he says that Group by Date is one thing... you need to also order by estimatedclosedate... but he was no help in providing a solution. BTW ...

Replicate column info 01-25-08
Hi- I had a question earlier about replicating columns for a project I'm doing. There is one column that has the info being pulled from a form. Another column in the same table needs to pull in the same information. In excel you would use the equals sign to pull the same info. How would you do that in access? Thanks in advance You would never do this in a relational database. If you want to see the column twice on a form or report, just bind a second control to the same field. In the case of a query, you would never do this unless you were creating a query that was to be used t...

Using meta-info or is it possible to extend the OneNote XML Schema
Hey, I'm working on an add-in that will sync "To Do"-tags with a CalDAV-Server, making them available on iPhones and Mozilla Thunderbird. Unfortunately OneNote is making this very hard for two reasons: 1. <Meta>-elements can't be childs of <Tag>-elements, so they wouldn't move with a <Tag>-element or be deleted if the user moves the <Tag> to another <Outline> or even <Folder>. That means that <Tag>-Elements are hard to identify uniquely, unless there's a good way to extend the OneNote XML-Schema (for exampl...

Exporting CRM Opportunity List to Office Excel 2007
We have CRM 3.0 Server. Our users are using CRM Web Client to access their leads, opportunities, quotes and orders. Using the Export toolbar button in CRM, users who have Office 2003 installed on their PCs are able to export opportunity lists to Excell perfectly all right, however users who have Office 2007 installed are not able to do that! Is this a limitation in CRM 3.0 ? Is there a workaround (If any)? Any possible risks when using or applying this workaround (If any)? "luai7" <luai7@discussions.microsoft.com> wrote in message news:6CADFDC5-8439-4B5F-955A-D6DBF...

Mutual Fund Last Update and Day's Change not updating
THIS PRODUCT IS MICROSOFT!!! IT IS BILL GATES!!! How long will the developers allow this problem to go on??? I've used MSN Money's Portfolio for years and just started getting the problem in the past six months. A post from MS says "we are working with our data providers to supply the correct date". Fire the data provider and go back to the one you used for years. I think this is a MS programming error that should be fixed by an entry level programmer in two hours. I'll take that bet. "evy38" <evy38@discussions.microsoft.com> wrote in messa...

problems with imported dates
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Power PC I am importing data with dates that range from 1887 to 1950s. Excel keeps the 1880s dates, but either subtracts or adds 4 years and one day to all of the 1900s dates. I have tried reformatting the dates in the source information, reformatting in excel and copying to another spreadsheet, using different date formats to move the data, etc. nothing seems to work. <br><br>If there is anything this program should do, its process dates correctly. This is a major issue when accuracy is involved and is wor...

unlimited change tracking #2
I'd like to use change tracking similar to what Word has. I found such a feature in Tools | share workbook, but it limits you to a specified number of days. I want all changes tracked permanently--essentially version control...is that possible? _____ DC G ...

Change Preset Columns
My columns have 1,2,3, etc., how do I change them back to ABC,etc?? Its under Tools, Options, General Tab, uncheck R1C1 reference box. "Bernie" wrote: > My columns have 1,2,3, etc., how do I change them back to ABC,etc?? ...

PM
Is there an option to set the default date for the Void Date to the current date vs. the trasaction date? Meaning that I want to use the current date as the posting date instead of the doc date, without having to remember to change it manually (senility). Thanks Jeff G Jeff, There is no option to do this, you have to keep changing the date manually unless you want to have a customization that does this. -- Victoria Yudin GP MVP "Jeff G" <jgarrison@theathletesfoot.com> wrote in message news:uJCMQ8hQGHA.2692@TK2MSFTNGP14.phx.gbl... > Is there an option to set t...

COUNTIF: drag to change criteria, NOT range
Hello, I'm hoping that there's someone out there that can help with this problem. I'm trying to count values in one column so that I have an amount of each for a distribution. For example: 8 8 8 11 11 11 12 12 12 I'm using COUNTIF because it's the only one that seems to work, but whenever I drag to fill the series Excel doesn't fill in a linear fashion. Instead it repeats the formulas I've already entered. Here's an example of what I enter into the cells: =COUNTIF($A$2:$A$36,8) =COUNTIF($A$2:$A$36,9) =COUNTIF($A$2:$A$36,10) ....and so on. When I highlight...

GP 10 table changes
Is there a document available somewhere that lists the table changes made in release 10? Yes, this is widely documented in the Dynamics GP Software Development Kit, which can be found on CD2 of your installation software. Also, you can download updated versions from CustomerSource or PartnerSource. Best regards, -- MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Business, LLC http://www.maximumglobalbusiness.com "Elaine" wrote: > Is there a document available somewhere that lists the table changes made in > release 10? Hi Mariano, thanks for the quick response! I...

How do I change a default Message Delivery option?
I have a user who has managed to change his default email option to have "Expires after" turned on by default. I would like it turned off. I've tried turning it off and saving it as a template, but I would like it off in the default case... ...

Order Fulfillment Date bug?
When you fulfill an order (ACTIONS->FULFILL ORDER), a dialog window pops up and you can specify the date the order was fulfilled, which may of course be a date in the past. I assume that this date is written to the DATEFULFILLED attribute in the ORDER entity. Problem is that no matter what date is entered as the fulfillment date, the DATEFULFILLED reverts to the current date. We need to be able to specify and retrieve the actual date the order was fulfilled, not the date CRM was updated. Grateful for any insights! Henricus ...

How do I change the size of the automatic window outlook
Can I change the size of the initial window that outlook opens up into? I do not like it when it takes up the whole screen. "bhanley" <bhanley@discussions.microsoft.com> wrote in message news:E723FC0E-546B-4400-A689-0B1289EB0DEB@microsoft.com... > Can I change the size of the initial window that outlook opens up into? I > do > not like it when it takes up the whole screen. Make sure the shortcut you're using to start Outlook isn't specifying that Outlook should open maximized. If it's not, then size it the size you want by dragging the...

changing IP of the exchange server
Hi, I have windows 2003 with exchange 2003 server, running perfectly fine. Recently I have been assigned with a new IP address from my ISP and so I have to use the new IP address instead of the old one(It is a public IP address.) My query is can I change the old IP address to the new one without affecting the functionality of the server. Is this a working scenario.I don't want to try and disturb the current setup Please advice. Regards Vic On Sun, 11 Dec 2005 16:01:51 +0400, "Vikrant" <vikrant_nath@hotmail(removethispart).com> wrote: > >Hi, > >I ha...

Graph where source data has different dates
I'm trying to do a comparision line graph with two series of data. The are both tracked by date with the same range (from April 2008 to April 2009). However one series has data monthly and the other has data weekly. When I try to combine on a graph the dates just don't line up. Is it possible to have these line up correctly. I've tried formatting the axis to days instead of months but it appears to only line up data points. So for the data reported monthly, it is graphed across the first 12 days. Hopefully that makes sense. If not, just let me know & I'll try t...

How do i transfer spreedsheet info in excel to MS Word make label #2
How do i transfer information on a Excel spreadsheet into a word mail merge to make labels. I am new at this. You don't mention a version, and details vary on that basis. Generallyyou want to work from within Word to create your Form document and begin the mail merge process. Assuming the data in the Excel file is stored appropriately you can specify that file as the Record Source for the merge. When you complete the merge Excel's data will be read into the labels, one label per record. HTH |:>) "water" wrote: > How do i transfer information on a Excel spreads...

Searching Inactive Accounts/Contacts/Opportunities
Hi, If you inactivate an account, contact or opportunity and do a basic Find those records do not appear in your results. Even if your dropdown is set to "Inactive Account/Contact/Opportunity". I know you can do this with Advanced Find. Anyway to do it with basic find? Alan Hi Alan, no, it is not possible to do it in quick find (basic find).... because.... For each entity, there are is only one view that is searchable with the Quick Find Query. For Accounts, it is the Active Accounts view. What this means is if you are in the Disabled Accounts view, for example, and enter...

Cannot publish the changes made to the Forms in MSCRM
Hi, I just made some changes in the Lead and Oppurtunity forms in MSCRM but when i publish the forms in the Deployment manager, Though it says that it has been published successfully it still doesn't reflect the changes when i open a new Lead or Oppurtunity form...could anybody please help...I have tried this on 2 other MSCRM servers...it works well there..... If anybody could help me with this i'll be really thankful. For performance reasons, the CRM servers cache the XSL files that represent the forms you just published. 9 times out of 10 a simple IISRESET on the Web Server ...

Changing hourly increment in Plan A Meeting/Meeting Request window??
I have a user who, when she goes to Plan a Meeting/Meeting Request window, she sees 3 hour increments (on the timeline to the right of each selected attendee). INcrement go... 12 o'clock (space)3 o'clock(space) 6 o'clock, etc. I cannot recreate it. Changing the normal calendar view does not affect it. I have combed thru every menu and submenu with no luck. any ideas? ...

Date Format #9
Hi I copy a SQL Query output and place it into Excel. The time column shows dates as 4/7/2006 4:02:10 AM, 2/28/2006 10:37:39 AM, 3/1/2006 1:56:40 PM. IS there a way to get rid of the hr, min and secs ? I used the format cells function on eg 4/7/2006 4:02:10 AM, 2/28/2006 10:37:39 AM, 3/1/2006 1:56:40 PM. and the columns show 4/7/2006, 2/28/2006, 3/1/2006. However, when you select the each cell, it still actually retains the values as 4/7/2006 4:02:10 AM, 2/28/2006 10:37:39 AM, 3/1/2006 1:56:40 PM I need the dates only because I am plotting a graph. With the hr, min and sec fun...

Error in in validating some dates
Hi all, i've installed SQL server 2000 english version and the CRM server in my native language, italian. Italian date formatting is different from the US model, i.e. we use 24/12/2004 instead of 12/24/2004. So, in some case, in particular for due dates, the validating of the suggested date format sends me an error and doesn't insert the record. I've set italian language on mail SQL server properties, but i got no benefit. Any idea about this behavior? Thanks in advance. Domenico. Hi Domenico, See if this helps at all: Go to Home > Settings > System Customization. ...

Send Date to a Memo Field
I have a subform with the following fields: Status NoteField I would like the double click event for Status to do the following: Change the status to "Ordered" Change the Notefield to Notefield + The Current Date I have tried: Private Sub Status_DblClick(Cancel As Integer) Status.Text = "ORDERED" NoteField.SetFocus NoteField.Value = NoteField.Text & Date End Sub I have also tried Notefield.Text in place of NoteField.Value I can copy text but I cannot get the date into the NoteField field. Thanks Your code does fail, as stated. I did a little modif...