Custom Menu - Opening a url and passing field on current form

I want to create a button on Oppurtunity Form that opens 
a url and passes current user as part of the query string.

I am able to create the button using isv.config file. 

Someone had earlier posted code below regarding a similar 
scenario. 

1. they didnt say where to place the htm file. 

i have saved it in root of crm server...wwwroot

when i try to open the url, it gives an error ... 

'windows.opener.crmForm' is null or not an object. 

Does any one know how to fix this ? OR know where to 
place the htm file so it know what crmForm is ... 

OR 

A different way to open a url .. and pass a value from a 
field on current form. 

Thanks





You won't be able to actually pass values up to the 
window you pop from CRM,
only the OTC and ID get passed in the QueryString.  If 
you don't want to do
this by calling the platform, here's how you do it all 
client-side code.
Just paste this code into an HTM file and call it from 
the isv.config:

<html>
 <head>
  <script language="javascript">

   function window.onload()
   {
    oForm = window.opener.crmForm;

    sCity = oForm.address1_city.value;
    sState = oForm.address1_stateorprovince.value;
    sZip = oForm.address1_postalcode.value;

    window.navigate("http://www.mapquest.com/maps/map.adp?
city=" + sCity +
"&state=" + sState + "&zipcode=" + sZip);
   }

  </script>
 </head>
</html>

0
Jazz
9/30/2004 5:02:53 PM
crm 35858 articles. 1 followers. Follow

1 Replies
707 Views

Similar Articles

[PageSpeed] 15

Ok I have found the reason why this wasnt working. 

If you use the toolbar on top and open url in new window, 
you have access to form object. But if you open from 
side  toolbar and within the CRM window, you dont have 
access to form object. 

CHECK my code below .. if i do it from top it works .. 
but using second method, opening it from right bar .. it 
dosent. 



<ToolBar ValidForCreate="0" ValidForUpdate="1">

<Button Title="TSM" ToolTip="TSM" 
Icon="/_imgs/ico_18_debug.gif" Url="http://englert-
server4/tsm.htm" PassParams="0" WinParams="" 
WinMode="0" />

<ToolBarSpacer/>
</ToolBar>

<!-- The Account Left Nav Bar -->
<NavBar ValidForCreate="0" ValidForUpdate="1">

<NavBarItem Icon="/_imgs/ico_18_debug.gif" Title="TSM" 
Url="http://englert-server4/tsm.htm" 

PassParams="0" Id="navItem"/>

</NavBar>





>-----Original Message-----
>I want to create a button on Oppurtunity Form that opens 
>a url and passes current user as part of the query 
string.
>
>I am able to create the button using isv.config file. 
>
>Someone had earlier posted code below regarding a 
similar 
>scenario. 
>
>1. they didnt say where to place the htm file. 
>
>i have saved it in root of crm server...wwwroot
>
>when i try to open the url, it gives an error ... 
>
>'windows.opener.crmForm' is null or not an object. 
>
>Does any one know how to fix this ? OR know where to 
>place the htm file so it know what crmForm is ... 
>
>OR 
>
>A different way to open a url .. and pass a value from a 
>field on current form. 
>
>Thanks
>
>
>
>
>
>You won't be able to actually pass values up to the 
>window you pop from CRM,
>only the OTC and ID get passed in the QueryString.  If 
>you don't want to do
>this by calling the platform, here's how you do it all 
>client-side code.
>Just paste this code into an HTM file and call it from 
>the isv.config:
>
><html>
> <head>
>  <script language="javascript">
>
>   function window.onload()
>   {
>    oForm = window.opener.crmForm;
>
>    sCity = oForm.address1_city.value;
>    sState = oForm.address1_stateorprovince.value;
>    sZip = oForm.address1_postalcode.value;
>
>    window.navigate
("http://www.mapquest.com/maps/map.adp?
>city=" + sCity +
>"&state=" + sState + "&zipcode=" + sZip);
>   }
>
>  </script>
> </head>
></html>
>
>.
>
0
Jazz
10/5/2004 2:14:46 PM
Reply:

Similar Artilces:

Dropdown Menu for Individual Stocks Missing from Money 2007?
Older versions of MS Money had a dropdown menu on the details page of a stock, fund, bond, etc., which listed every other holding I had or had so I could go from one to another quite easily. 2007 does not seem to have this feature. In order to go to the details page of a stock, for instance, I have to go to the Account, then find the stock and then go to the details. If it is a stock in a closed account, or if I don't remember what account the stock is in, I wouldn't know how to get to the details page. Can anyone elaborate on this? Thanks -- David Schwartz Commack, NY ...

Pass-Through Query problem in access 2007
I have an Access 2007 SQL Pass-Through Query to MS SQL Server 2000 that executes a stored procedure with parameters. The SP just inserts some rows in a table and returns an integer as a return code indicating success or failure. When the "ReturnRecords" property is turned on so the code is returned to the client, it appears that the query runs twice since the table shows twice as many rows inserted than it should. When the "ReturnRecords" property is turned off, the correct number of rows are inserted. This is a strange bug. Any ideas? I'm using an ODBC connection. Th...

Custom Entity Relationship CRM 3.0
I have created a new custom entity (A) for which I need to create two referential relationships to other custom entities (B) & (C). (A) is the primary entity in both cases. The relationship between (A) and (B) acts normally. The relationship between (A) and (C) doesn't. When I try to add a (C) record from (A), (A) displays two records in the (C) lookup. One "record" displays data from system fields (created on and status). The second "record" displys data from the primary field. I am not able to access (C) record from the associated view in (A), but I can a...

Word Form Send To function dropping activeX controls
Hey all...new to the forum but i have a question i hope can be answere here. I work in a large Telecom/IP/Voice network managment center and we hav recently implemented a "network report" that needs to be completed b each shift telling the next shift what the overall health of th network, and alerting the next crew to any potential issues. Problem is this. I have 3 checkboxes at the top of the form t indicate what shift the form is for. We edit the form in Word and the file>send to mail recipient, and the text shows up but the check boxe are gone. If i send as attachment the...

Custom toolbar and macros
I am moving a user from Windows 2000 to XP and he has a worksheet with many custom Macros as well as the custon toolbar with it. We can move the worksheet and the macros will move with it. The problem is moving the custom toolbar with it. How do I get the toolbar to move along with the worksheet. One way: With the custom workbook active, choose Tools/Customize/Toolbars. Click Attach. Attach your custom toolbar to the workbook. In article <F0FC2885-07CB-4706-BC67-DEB7B664BACF@microsoft.com>, "MD" <MD@discussions.microsoft.com> wrote: > I am moving a user fro...

toolbar customization
533 MHz Power PC G4 384 MB SDRAM MAC OS X 10.3.3=20 Office X: Excel 10.1.5 (Service Release 1) When I drag command buttons to Excel's Standard Toolbar I get grayed-out = icons as follows: Hide Detail Show Detail Insert Rows Ironically the following buttons, dragged in precisely the same = fashionto the=20 Standard Toolbar, work satisfactorily: Insert Columns Delete Column Delete Row Any suggestions? Has MS discoveed and repaired these bugs for the May=20 2004 updates? While they're not bugs, they are confusing. You probably dragged the Insert Rows button from the Edit categ...

reuse unusable urls in a column ith 1 command
Hi all, Here is another freak question from one of my students: "I receive a column with URL's where some are clickable and others aren't. (blue or black) When I get into a cell with an unclickable url and press F2 and next Enter the URL becomes clickable again. Taking me to the clicked website. When I have a column of 5 problematic URL's this is OK but when I have thousands of rows I get tired. Is there a way to in one command activate all unclickable URL's?" My idea is that we ould need a macro to go to all rows and edit and confirm. I could write the macro ...

CRM Customization: Display Contact Info on Service Activity Form
We'd like to be able to open a service activity, and display all of the associated contacts' information (name, phone, address) on the same form. We have attempted to use IFRAMEs to load this information, but have so far been unsuccessful in achieving the desired effect. What is the best approach to take here? I am trying to do the same... What I really want is: 1) Service activity calendar view to show the customer name, number and address in the mouseover 2) When a service calendar item is clicked on, I would like the contact name, address and telephone listed in the main fo...

Tracking customer orders when receiving stock
With our current POS system we can place items on order for a particular customer (whether we are holding the stock or not) and when we generate purchase orders the system automatically pops up letting us know we have pending orders for customers. We can then generate a purchase order based on this information. When we receive the stock, we can print out a report for that order that lists what stock needs to be allocated to which customers. Is there a way with RMS that we can do this? Unfortunately it is a regular occurance that our stock levels can be incorrect, for instance we may have a 0 ...

No right knob mouse menu in Word 2010 Beta
In text, tables and formulas the right knob mouse menu doesn't work. Only on pictures or images in the document it works correct. If you release the mouse knob, the menu flashed up a moment. I have a normal mouse on a desktop PC with Windows 7. I have tried other mouses, but I'd the same problem. There is no problem in any other application, older office programs or another office 2010 beta program. ...

Customize Does not WOrk
When I clip the customize outlook today button, it does not respond. Anyone have an idea of what the problem might be? Posted several times a day here: OL2000: You Cannot Customize Outlook Today After You Install Critical Update 813489 for Internet Explorer: http://support.microsoft.com/default.aspx?scid=kb;EN-US;820575 -- Russ Valentine [MVP-Outlook] "Glenn" <anonymous@discussions.microsoft.com> wrote in message news:05cb01c3cc7b$467a26c0$a101280a@phx.gbl... > When I clip the customize outlook today button, it does > not respond. Anyone have an idea of what the pr...

Outlook 98 W2K
Hi.. We are running office 97 with outlook 98 on Windows 2000 If the user is configured as a power user for the PC they have all of the options visible on the actions menu. If they are a normal user then the actions menu options with one blank line and nothing else. We have given the users full access to the Office directories off program files and also full access to HKLM\Software\micosoft\office areas in the registry. As an organisation we have a policy of not making users power users. Does any one have any suggestions? Hello, We had this same exact promblem at our work. Yo...

How to display HTML in Custom Task Pane
Does anyone know if it is possible to program a custom task pane in Office 2007 (using VSTO) to display hosted web content (i.e. HTML). How about locally stored HTML? My team is looking at ways of providing modest on-screen assistance to support our custom Add-in that docks nicely within the application and can be coupled with a few controls. If it's not possible, we're stuck using CHM. Thanks in advance. ...

XY Scatter with Custom Labels
I have a list of products, each with an X (a dollar amount) and a value (a percentage). Is it possible to have each point labeled with custom value i.e.: Printer, or Digital Camera, rather than it bein labeled with just the values being plotted ($1,000, 2% or $500, 7%)? Any ideas are appreciated. Thanks, Keit -- hatzipe ----------------------------------------------------------------------- hatzipet's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2789 View this thread: http://www.excelforum.com/showthread.php?threadid=47392 You can edit the text of a labe...

Change dates to a custom format via formula ... how to?
Hello, A2 has formula =NOW() which makes date today in this format: Tue.Apr.26.2011 How can I get my custom date formats so that the above date shows up as Tu.Apr.26.2011. In another sheet, I was kindly given this to make these types of changes: =IF($A$2<>"",TEXT($A$2,"yymmdd.")&CHOOSE(WEEKDAY($A$2),"Sn","Mn","Tu","Wd","Th","Fr","Sa"),"") I tried this, =NOW()&CHOOSE(WEEKDAY($A$2),"Sn","Mn","Tu","Wd","Th","Fr","Sa&...

Choosing fields for system integration
I have a question on system integration on selecting "Unused" fields for storing data. Our system for entering tasks, billing, and tracking status on projects has fields that would be nice to have in the Great Plains system. Like the last 4 digits of the phone number or the gps coordinates of an office. Should these types of additions be done in a new table or is the recommended way to piggyback on an existing field that is not currently being used? What are the issues that we might face on future upgrades with either adding new fields or using "unused fields"? As...

DoCmd.TransferDatabase import "FORMS"
I am trying to import new forms into a database using the following vb code. Of course it doesn't work. Any help here would really be appreicated; DoCmd.TransferDatabase acImport, "Microsoft Access", "C:\Folder\DBname.mdb", acForm, "FrmName, frmName" Thanks -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200710/1 "FrmName, frmName" should be FrmName, frmName Pieter "CWH via AccessMonster.com" <u31211@uwe> wrote in message news:7a119afee29c8@uwe... >I am trying to import ne...

Customer Report
Hello, I am hoping someone might assist me with a problem. I am trying to customize a customer report to show the Notes from the customer file. It has been suggested to me to run a query on this to pull the info I want. This is great, but not ideally what I am looking for. I want anyone in the office to be able to run the report and filter it to their specifications. For example: we have an anual catalogue and we do not send it to everyone on our mailing list. We want to send it to local customers who have spent money with us or who specifically request a catalogue. We have used up all ...

How to Customize Business Portal to show custom objects?
Hi, I need to Customize Business Portal to show my custom objects in "Primary Publishing List ResultViewer Web Part","Rich List ResultViewer Web Part","Form ResultViewer Web Part"? I need to create pages similar to Customer Summary page in sales center with my custom objects. How can i do that? Thanks, Mohan ...

Close two forms at once?
I have two forms that open up in succession and stay visible together as part of my invoice creation process. When we have finished editing the second form, I want to have a single Close button that will close both forms with one click. Assuming that we're talking about Form1 and Form2, how would I code this, please? Many thanks CW Private Sub CloseTwoForms_Click() DoCmd.Close acForm, "Form1" DoCmd.Close acForm, "Form2" End Sub -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster....

Custom X-axis
Hi everyone. I need to create a custom x-axis in which the values double at each interval. i.e. At the first interval the value must be 20, the next 25, 31.5, 40, 50, 62 ...20,000. Even though the numbers do not have an similar differences (e.g. 25-20 is not equal to 62-5) I will still need these values to be equally spaced. Thanks for any help you give, it's greatly appreciated! Fred. PS. If you want to know what I'm doing, I'm plotting an amplitude:frequency graph, where each spacing between each frequency is 1/3 of an octave. Fred - Two options. Make a Line chart,...

GPS Customization Query
Hi All, Is there a way to avoid/remove "Quick Links" and "Help" links from the Business Portal Site for the end users? Any help on this would be very handy. Regards, Kuldeep ...

change local customer to global customer
I am trying to change the local customers that i have in my store database to global customers in hq I ran this querie in store administrator UPDATE Customer SET GlobalCustomer = 1 Then ran worksheet 401 in hq, but the customers did not update, then worksheet 350. Can someone help? Had the same issue ... this worked for me - need to set globalcustomer = 1; need to set lastupdated = getdate(*); need to set storeid = 'xxxx' (whatever is appropriate for you). Go into SO Manager and configure ENABLE GLOBAL CUSTOMERS and NEW CUSTOMERS DEFAULT AS GLOBAL. Need to run 401 TWICE (once...

How to customize column width in Ressource Usage report ?
Hi, When printing the Workload, Ressource Usage report, some of the durations are stated as #####.##. I tried to make the font smaller but it did'ent help. How do I make the report readable? I am using MS Project 2007 SP2. Br Bertrand If you goto Reports, Custom you can see all of the built-in reports and you can see what they are made of and you will see that they use a filter and a table (and other settings and stuff). The column width of each field is a property of the table. Find the report that you are interested in, then find the table that it uses, then e...

customize public folder
Hi, I have exchange server 2003, on a windows 2003 server environment. 1) I want to remove or hide the "favorites" folder under the public folder tree? 2) May I not to use the existing public folder tree structure? Public folder --> All Public folders --> (Company contacts) Public folder --> (Company contacts) Thanks, On Tue, 30 May 2006 15:32:25 +0800, "Classmate" <NoEmailAddress@abc.com.hk> wrote: >Hi, > > > > I have exchange server 2003, on a windows 2003 server environment. > > > >1)...