Answered by:
passing parameter from Account Form

Question
-
Hello, I have an asp.net page. I would like to know how to add stuff to the CRM's form so that I can get a field name from the URL and pass that query string parameter to my page?
For instance, the form has "Last Name" field, and when the user clicks on the "Details" tab, there's an IFrame with a URL to my asp.net page http://localhost/test/default.aspx?LastName="test"
The LastName="test" .. how to pass that to my URL?
Wednesday, December 10, 2008 12:01 AM
Answers
-
Hi, Following code is working for me;
Code Snippetvar testStr=crmForm.all.lastname.DataValue;
var URL = "http://www.google.com/search?";crmForm.all.IFRAME_Sendvariable.src=URL + 'q=' + testStr;
alert (crmForm.all.IFRAME_Sendvariable.src);
Wednesday, December 10, 2008 10:43 PMModerator
All replies
-
Hi,
It is very much possible easily. Following post will help you;
http://www.simonrhart.com/2008/10/passing-data-from-microsoft-crm-custom.html
http://blogs.msdn.com/crm/archive/2008/07/16/linkedin-to-microsoft-dynamics-crm.aspx
Wednesday, December 10, 2008 1:19 AMModerator -
var myData=crmForm.all.crm_field.DataValue;
How do I know what my crm_field and dataValue is? I am interested in only the last name.
Wednesday, December 10, 2008 2:33 AM -
Hi,
The crm_field here refers to the name of the attribute that you require(example name for "Account Name" field on the form), and DataValue returns you the value of the field on the form which you need to pass.
You can get the name of the attribute by clicking on the form field->Change Properties->Name tab on the form customization window.
Hope this helps.
Regards,
Shubhi Bansal
GrapeCity India
Wednesday, December 10, 2008 10:00 AM -
Hello,
in most of similiar threads solution is mentioned based on IFRAME parts within entity FORM.
That is simple and good for some deployment scenarios. Because IFRAME is allways populated it is not suitable for large scale deployements as it creates plenty of reguests/trafic/loads. For such deployments it make sense to invoke action based on user demand - so Left Navbar click or Action menu click.
But what about passing params to left nav bar configured in ISV.CONFIG.
Any idea ?
So far I have to read entity values with Web Service request - that is pitty as the Form is open on client allready.
Thanks for any idea in this scenario.
Jiri
Wednesday, December 10, 2008 11:10 AM -
Hi,
Jiri:
Following will work for you;
http://nishantrana.wordpress.com/2007/10/01/using-isvconfig-to-access-field-values-in-crm/
AznDude:
Following help material on CRM SDK will you in understanding the JavaScript. Please give it some time.
Wednesday, December 10, 2008 12:33 PMModerator -
Hello, I added this to the form property:
var testStr=crmForm.all.name.DataValue;
var URL = "http://localhost/test/default.aspx?";//setting the source of the IFrame here
crmForm.all.IFRAME_Sendvariable.src=URL + 'TestString=' + testStr;
But it's not working. .. what else I am supposed to do to the IFrame?
Wednesday, December 10, 2008 6:41 PM -
Hi, Following code is working for me;
Code Snippetvar testStr=crmForm.all.lastname.DataValue;
var URL = "http://www.google.com/search?";crmForm.all.IFRAME_Sendvariable.src=URL + 'q=' + testStr;
alert (crmForm.all.IFRAME_Sendvariable.src);
Wednesday, December 10, 2008 10:43 PMModerator -
Thank you uMar,
I discovered with the help of book Programming Dynamics CRM 4.0 that NavBar and Form are in fact in one script - so there is no difference in way how to use script technics available from SDK.
Thanks again
Friday, December 12, 2008 9:00 AM -
uMar
the issue I face is that NavBarItem does not contain script attribute. There is only Url.
In such case I do not know if there is even way how to construct isv.config to build dynamic Url.
Jiri
Friday, December 12, 2008 3:06 PM -
Need: Microsoft Dynamics NAV Developer -- Woodcliff Lakes, NJ
Woodcliff Lakes, NJ for 12mths
ROLE DESC: Seeking a Microsoft Dynamics NAV Developer to provide production support and maintenance, and to develop enhancements to existing system.
Candidate must have experience with the following:· Microsoft Dynamics NAV + CRM
· TRIMIT - Manufacturing
· ConnectPortal for NAV
· Microsoft SharePoint Portal
· Application/Development using: .NET, C#, C/SIDE, HTML, CSS, etc
SKILLS: Accounting/ERP/CRM:
· Microsoft Dynamics NAV + CRM
· TRIMIT - Manufacturing
· Serenic Navigator - Fund Accounting
Add-On/Vertical Solutions:
· UNITIME - Workforce Management
· POS/Retail - LS Retail & RMS
Access/Integration:
· ConnectPortal for NAV
· Microsoft SharePoint Portal
Analytics/Reporting:
· NEMO - NAV Dashboard/Key Metrics
· Microsoft SQL - Reporting Services
· Microsoft BI - Business Intelligence
· JET Reports
Application/Development
· Custom applications for unique needs, using: .NET, C#, C/SIDE, HTML, CSS, etc.
Thanks & Regards
Manish
Sterlite Software USA,Inc
Resource Manager
Tel: 708-434-0632 (Direct)
Tuesday, March 3, 2009 7:46 PM