Opportunity Unique ID

We are using CRM 4.0 and it would be really useful to create a reference 
field that automatically creates a unique ID. I can't work out how to do this 
- any ideas?

Thanks
0
Shaun (103)
3/30/2008 6:18:01 PM
crm 35858 articles. 1 followers. Follow

2 Replies
379 Views

Similar Articles

[PageSpeed] 55

I recently used the following code as a simple method to create a unique Id 
for the Account form's AccountNumber attribute.
It may not be the best way to do so, but it worked for me:

// Generate Account Number
if (crmForm.FormType == 1)
{
    var aName = crmForm.all.name.DataValue;
    aName = aName.substr(0,3);
    aName = aName.toUpperCase();
    var iNum = Math.random();
    iNum = iNum.toString();
    iNum = iNum.substr(8,4);
    var myDate = new Date();
    myDate1 = myDate.getDate();
    myDate1 = myDate1.toString();
    myDate2 = myDate.getMonth();
    myDate2 = myDate2.toString();
    myDate3 = myDate.getFullYear();
    myDate3 = myDate3.toString();
    julDate = myDate1.concat(myDate2, myDate3);
    actNum = aName.concat(julDate, iNum);
    crmForm.all.accountnumber.DataValue = actNum;
    crmForm.all.accountnumber.ForceSubmit = true;
}

HTH,
-- 
MD



"Shaun" wrote:

> We are using CRM 4.0 and it would be really useful to create a reference 
> field that automatically creates a unique ID. I can't work out how to do this 
> - any ideas?
> 
> Thanks
0
MD1 (196)
3/31/2008 5:36:00 AM
You could also use an IDENTITY attribute on a column in the database, if all 
you needed was a unique number. (This is unsupported, btw)
you need to create an Attribute, publish it, then run this query;
ALTER TABLE accountextensionbase DROP COLUMN org_id
GO
ALTER TABLE accountextensionbase ADD org_id NUMERIC IDENTITY NOT NULL
GO
-- 

Grizz


"MD" wrote:

> I recently used the following code as a simple method to create a unique Id 
> for the Account form's AccountNumber attribute.
> It may not be the best way to do so, but it worked for me:
> 
> // Generate Account Number
> if (crmForm.FormType == 1)
> {
>     var aName = crmForm.all.name.DataValue;
>     aName = aName.substr(0,3);
>     aName = aName.toUpperCase();
>     var iNum = Math.random();
>     iNum = iNum.toString();
>     iNum = iNum.substr(8,4);
>     var myDate = new Date();
>     myDate1 = myDate.getDate();
>     myDate1 = myDate1.toString();
>     myDate2 = myDate.getMonth();
>     myDate2 = myDate2.toString();
>     myDate3 = myDate.getFullYear();
>     myDate3 = myDate3.toString();
>     julDate = myDate1.concat(myDate2, myDate3);
>     actNum = aName.concat(julDate, iNum);
>     crmForm.all.accountnumber.DataValue = actNum;
>     crmForm.all.accountnumber.ForceSubmit = true;
> }
> 
> HTH,
> -- 
> MD
> 
> 
> 
> "Shaun" wrote:
> 
> > We are using CRM 4.0 and it would be really useful to create a reference 
> > field that automatically creates a unique ID. I can't work out how to do this 
> > - any ideas?
> > 
> > Thanks
0
3/31/2008 2:00:01 PM
Reply:

Similar Artilces:

The user ID associated with the current record is not valid
Hi: I just install CRM 4.0 in new server running Server 2003 and SQL2005. After restore <organization>_MSCRM and MSCRM_CONFIG databases from old server I received this error: The user ID associated with the current record is not valid Any help to resolved this issue will be appreciated, -- Jose Valentin Rodriguez MCP-GP MCBMSS-GP You probably need to recreate the Special CRM groups in the SQL servers security to map to the restored database security. Look at the security on the database an make sure thoese groups exist in the global security of the SQL server. -- Gary Herbstman...

Conditional format for unique values
Hello, I would like to set a conditional format to color each unique value a different color. It will also be applied to multiple occurences of the value. The problem is that the values are dynamic and may not always be the same number of occurences, in the same cell, etc. I have used the formula IF(ISNUMBER(COUNTIF($F$3:F3,F3)),ROW(),"")) to try to identify the occurences but creating a conditional format has proven out of my league! Please help! And thanks!! Conditional formats are limited to 3 different formats in XL2003 or less. So you can end up with a max of ...

Compare 2 Sheets and Extract Unique Info to a 3rd Sheet
I have two sheets of stock data from a stock screener, both same parameters, just different time frames (i.e., one sheet is newer whenever I import new a new screen from the Internet), which will pull different stocks as time passes. I'm trying to compare the two sheets and extract the stock data (a whole row's worth of data, not just a cell) that is unique to the "Last Import" sheet. This would allow any new stocks identified on the screener to be transferred to a new sheet (called "Filtered List"). That way I don't have to research the same stocks over and ove...

How to ensure the resource ids are unique?
Hi friends, In my MFC project I have imported resources from another appliction,but some of the ids of the newly added resources confilicts with the existing ids, is there any way to make unique ids for all resources in the resource.h file?.should i edit the file manually? Expecting the answer form the experts programmes of this form Tony Tony Thomas wrote: > Hi friends, > > In my MFC project I have imported resources from another appliction,but some > of the ids of the newly added resources confilicts with the existing ids, is > ...

Event ID 1706
Dear All, Frequently I am getting the below error from Exchange 2k. "EXPS is temporarily unable to provide protocol security with "13th5040vn6iv8". "CSessionContext::OnEXPSInNegotiate" called "HrServerNegotiateAuth" which failed with error code 0x8009030c ( m:\transmt\src\smtpsink\exps\expslib\context.cpp@1462 ). Could any one help me regarding this Regards, johnson John "=?Utf-8?B?am9obnNvbg==?=" <johnson@discussions.microsoft.com> wrote in news:5CF4E892-D335-499C-A773-819C87A71F53@microsoft.com: > Frequently I am getting the ...

Add phone, fax & email to Buyer ID table
If the buyer ID table contained the buyer's phone, fax & email, then it would be easy to add these to the PO form. If a vendor has a question, they certainly want to connect to the right person. The only workaround is to use en employee number for the buyer ID and hope the RW match is exact. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Micro...

IMF event ID 7515
since installing Exchange 2003 SP2 which has a new version of t he IMF some messages are generating event IDS 7515 An error occurred while Microsoft Exchange Intelligent Message Filter attempted to filter a message with ID . This message will not be filtered. The error code is 0x800710f0. The Hex error code is always the same.... Any idea what causes this ? "Jason Blake" <JasonBlake@discussions.microsoft.com> wrote in message news:1833C4A2-65FA-4480-9850-FADAD901EA39@microsoft.com... > since installing Exchange 2003 SP2 which has a new version of t he IMF > s...

Changing Vendor ID on 1200 Inventory Cards
Is there an easy way to update one Vendor on 1200 Inventory cards with another vendor. I don't want to delete the first vendor I just want to add a vendor ID to these cards. All the item numbers have an identifing number. ie. all start with MEL Thanks, Gloria Do you want to replace the vendor on all the items with a new one? Write a sql script like: update IV00103 set VENDORID='yournewvendor' where ITEMNMBR like 'MEL%' If there are no vendors assigned to the items and you want to add records, then you will need to do an insert statement into the IV00103 with t...

Unique Tracking Number with Subject Line of Microsoft CRM E-Mail
The CRM E-mail router provides an interface between MSCRM & Exchange. The router takes a copy of the message and determines whether the message is relevant to CRM. If so, the message is delivered to MSCRM server, and an e-mail activity record is created. I have noticed that this is done using an unique identifier Number mentioned in the subject line when a mail is sent. I want to know whether one can forward all the mail's of a Exchange user to a CRM user account. Please Help! Yes, you can. I believe the setting is on the Tools options menu within the Outlook client. I never ...

Query same category id
May i know how to query all the jobnumber where it is in the same category ID? Because I want to use this as my list in combo box -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200705/1 I'm not clear yet what you are trying to achieve. One interpretation of your question would be that you wish to group by category ID. Another could be that you want to find jobnumbers that fall into a (pre-selected) category ID. Have you tried creating a new query that includes your conditions (selection), then using that query as the source for ...

14 Free Videos Teach You How to Spot Opportunities in Your Charts #2
Watch the just released Independent Trader Video Series. This series features 14 free videos that teach you how to spot opportunities in your charts that you may be overlooking. You get more than 100 minutes of video packed with valuable Elliott wave techniques that you can incorporate into your trading. Plus, you can watch and re-watch the online videos at your own pace and on your schedule. "I have watched the videos and have found them to be Educative and Insightful and am certain that it would help anybody who "Trades" with a serious approach." You can Watch it Now at...

Recipient policy error with event ID 8231
Hi All, We have an Exchange 2003 server which I recently upgraded to SP2. Now ever since the upgrade I see dozens of the following errors in the event log... Permanent failure reported by policy group provider for 'CN=Recipient Policies,CN=Howden,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=howdenren,DC=local':'MAD.EXE', error=8007203a. Taking provider offline. Everything is working fine except it appears that Recipient Update Services are indeed not functioning correctly as email addresses are not being automatically created for new users. I checked the doma...

Sales Configurator should automatically assign Configured BOM ID
Manually entering a config id for potentially reusable configurations is a noble concept. However, in most cases, sales order entry staff have no idea what to enter for a Configuration BOM ID when entering a sales order for a configured item. This field should automatically default to some editable text such as the order number dash line number. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follo...

ID no: c10308a2 error message when you use the Active Directory Users and
Hi all. I still have a problem :( "ID no: c10308a2" error message when you use the Active Directory Users and Computers snap-in to remotely add or edit an e-mail address for a mail-enabled user in Exchange Server 2003" sc sdset SCMANAGER D:(A;;CCLCRPRC;;;AU)(A;;CCLCRPWPRC;;;SY)(A;;KA;;;BA)S:(AU;FA;KA;;;WD)(AU;OIIOFA;GA;;;WD) not help to achieve this goal Is this error from multiple machines? All XP I assume. Have you tried reinstalling the Exchange Management tools? Nue "Maniac" <maniac@remove.hotbox.ru> wrote in message news:e28DtiGPGHA.1460@TK2MSFTNGP1...

ID and pasword (How i gedit)
i haw TeliaSonera-Intranet(ADSL)wrong e-mail. Kesoma-4@pp.inet.fi and Mauno.Kesomaa@Microsoft.com.Please ,sen order. Hi Mauno, Be aware of where you're posting. This newsgroup is dedicated to the Microsoft Access database product. Tom Wickerath Microsoft Access MVP http://www.accessmvp.com/TWickerath/ http://www.access.qbuilt.com/html/expert_contributors.html __________________________________________ "Mauno Kesomaa" wrote: > i haw TeliaSonera-Intranet(ADSL)wrong e-mail. > Kesoma-4@pp.inet.fi and Mauno.Kesomaa@Microsoft.com.Please ,sen order. ...

Event ID: 8331 Please Help
Hi, I can't fiqure out why this error floods my event viewer. Can't find resolution on knowledge base. Has some one experineced a similar problem? If so, do you know a resolution? Please Help Robert Event Type: Error Event Source: MSExchangeAL Event Category: Address List Synchronization Event ID: 8331 Date: 2/23/2004 Time: 11:32:32 AM User: N/A Computer: JSCSRV Description: The service threw an unexpected exception which was caught at f:\titanium\dsa\src\lra\abv_dg\lservagent.cpp(4511) For more information, click http://www.microsoft.com/contentredirect.asp. "Rob...

Win32 ID no: 80070005
Big issues with Public folders, I cannot get access to them. I even created a new public folder tree and store and the problem just seemed to replicate itself. Right now I have two exchange servers running and I'm able to access the public folders via the second server but I have not found a solution to my problem on the first. Any clues would be appreaciated. ...

Exchange 2003 Event ID 1110
Hi, I have Exch2003 (SP2) running on Windows server 2003 and all is well apart from the fact I have suddenly started getting event logs every hour on the hour 24 times! For example using the entry below, I received 24 alerts all timed at 14:30:37 exactly the same as the one below. Event Type: Error Event Source: MSExchangeIS Public Store Event Category: General Event ID: 1110 Date: 20/02/06 Time: 14:30:37 User: N/A Computer:DOMAINSERVER Description: Error 0x0 occurred while writing per-user information for administrator@mydomain.co.uk on database "First Storage Group\Public Folder St...

Addtional SMTP id
I want to add addtional SMTP ID for all the users in my exchange 5.5 server. Is there a way we can use some script of import functionality to perform this task? Regards, KLM You mean additional SMTP Address, right? The solution is to perform a Directory import. First you need to do a directory export to get all the information. Make sure that you download and use header.exe to create an export template that includes the SecondaryProxyAddresses header. Then, to add a new SMTP address to all users, simply modify that field (SecondaryProxyAddresses) and add the new address. Once don...

Photo ID?
Does anyone know if it is possible to add photo id's or picture id's in Outlook to a person's profile? Thanks. Mercy Health Plans <rseidel@mhp.mercy.net> wrote: > Does anyone know if it is possible to add photo id's or > picture id's in Outlook to a person's profile? Thanks. In the Contacts folder, yes. -- Brian Tillman OK, So how is it done? "Brian Tillman" wrote: > Mercy Health Plans <rseidel@mhp.mercy.net> wrote: > > > Does anyone know if it is possible to add photo id's or > > picture id's in Outlo...

Get your ClickBank ID on Thousands of Sites all over the World!
Imagine... Your Clickbank� Affiliate ID on Thousands of Pages All Over The World Making You Big Money 24 Hours A Day 7 Days A Week -100% Absolutely FREE! Build A Monster Ad Network of People Ready, Willing and Waiting To Advertise Your ID on Their Websites! This is Not A Wave of Opportunity... This is a Tsunami! A wave merely goes at it's own pace based on the currents of the ocean. A Tsunami is a giant wave up to 150 feet in height which can go up to 600 miles an hour and destroys anything in it's path. CBClicks is a Tsunami and it's merely the start. Ride the CBClicks ...

Removing Quotes, Opportunities, Invoices Tab
Is there a way to remove the quotes, opportunities and invoices tab from the 'Sales' section of the 'Account' record ? Our client does not use any of the opportunities, quotes and invoices records and those tabs are very disturbing. If not, is there a way to change the tab order ? Any help will be appreciated. Thanks Nicos Papaioannou Simply remove all security privileges for all user roles on those objects. The tabs will vanish "Nicos Papaioannou" <papaioannoun@dotcy.com.cy> wrote in message news:d72839e3.0409100831.20bc94c@posting.google.com... > Is ...

MS Office pre-loaded/locate product id?
I got a new Lap top with MS Office pre-loaded. How do I locate 2007 product ID? No CD packaging included. I tried clicking on MS Office button in hopes of finding it to no avail. Thanks Its a Trial Version, do you not have an Activation assistant shortcut on the desktop? "letsDiscuss" <letsDiscuss@discussions.microsoft.com> wrote in message news:22686F81-5D34-4C3F-8457-0FE0B6E61C15@microsoft.com... >I got a new Lap top with MS Office pre-loaded. How do I locate 2007 product > ID? No CD packaging included. I tried clicking on MS Office button in > hope...

Changing Vendor ID
We are using Great Plains 7.0 SQL 2000. We need to do a mass update to all our Vendor IDs by adding a prefix in front of all Vendor IDs. Can anyone lead me in the right direction on how to do this? Thank you, KBrown Microsoft provides (sells) a utility to perform this function. It updates all of the tables including open POs, open payables, history, etc and keeps all of the records in order. Check with your reseller. The price ( a few hundred dollars I think) is well worth maintaining your records in proper order. -- Richard L. Whaley Author / Consultant / MVP Documentation for ...

Count Unique with condition
Hello Everyone, I am looking for a formula to count unique occurances of column (A) where column (B) equals a certain value. Any help would be appreciated. I have the formula =SUMPRODUCT(('data'!A3:A6<>"")/COUNTIF('data'!A3:A6,'data'!A3:A6 &"")), which gives me a count of the unique values in 'data'!A, now I would like to break it down over a value in 'data'!B the result would look like this: smith, john, blue smith, john, red jones, james, yellow jones, james, green williams, john, orange williams, john, teal Uniq...