- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
.net qr code generator api Part II Solutions in Visual Basic .NET
Part II Solutions QR Code Encoder In Visual Basic .NET Using Barcode maker for .NET framework Control to generate, create QR Code JIS X 0510 image in VS .NET applications. www.OnBarcode.comQR Decoder In Visual Basic .NET Using Barcode reader for .NET framework Control to read, scan read, scan image in .NET applications. www.OnBarcode.comThe script for this example can be found in Listing 11-3. Note This code is located in the companion content at web resource Make Barcode In VB.NET Using Barcode generation for .NET Control to generate, create bar code image in VS .NET applications. www.OnBarcode.comBarcode Decoder In VB.NET Using Barcode scanner for .NET framework Control to read, scan read, scan image in VS .NET applications. www.OnBarcode.comFiles\Scripts\DependentOptionSet.js.
Denso QR Bar Code Maker In Visual C#.NET Using Barcode drawer for .NET framework Control to generate, create Denso QR Bar Code image in .NET applications. www.OnBarcode.comPrint QR In .NET Framework Using Barcode creation for ASP.NET Control to generate, create QR Code JIS X 0510 image in ASP.NET applications. www.OnBarcode.comLISTING 11-3 Filtering Options Based on the Selection of a Field Value
Quick Response Code Creator In .NET Using Barcode encoder for VS .NET Control to generate, create QR Code image in .NET framework applications. www.OnBarcode.comBar Code Generator In Visual Basic .NET Using Barcode drawer for VS .NET Control to generate, create bar code image in .NET applications. www.OnBarcode.com/* Description: This script will remove the FOB option from the Freight Terms option set if the Shipping Method is Will Call. */ function updateFreightTerms() { // Set up the option set constants // Ensure that these match the codes in CRM var SHIPPINGMETHODCODE_WILLCALL = 7; var FREIGHTTERMSCODE_FOB = 1; var FREIGHTTERMSCODE_NOCHARGE = 2; // Gather the field references var shipCode = Xrm.Page.data.entity.attributes.get("address1_shippingmethodcode"); var freightCode = Xrm.Page.data.entity.attributes.get("address1_freighttermscode"); var freightOptionsControl = Xrm.Page.ui.controls.get("address1_freighttermscode"); if (shipCode.getValue() == SHIPPINGMETHODCODE_WILLCALL) { // Default to No Charge freightCode.setValue(FREIGHTTERMSCODE_NOCHARGE); // Remove FOB as an option freightOptionsControl.removeOption(FREIGHTTERMSCODE_FOB); } else { // Default to blank freightCode.setValue(null); // First FOB as an option (if it is there) so // we don't add duplicate option freightOptionsControl.removeOption(FREIGHTTERMSCODE_FOB); //Add back the FOB option var fobOption = new Object(); fobOption.value = FREIGHTTERMSCODE_FOB; fobOption.text = "FOB"; freightOptionsControl.addOption(fobOption, 1); } } /* Description: This script will remove the FOB option if the Shipping Method is Will Call and is used for the form's onload event. */ function removeFreightTerms() { // Set up the option set constants Bar Code Maker In Visual Basic .NET Using Barcode printer for VS .NET Control to generate, create bar code image in Visual Studio .NET applications. www.OnBarcode.comGenerate Code 39 Full ASCII In VB.NET Using Barcode generation for .NET Control to generate, create Code 3/9 image in .NET applications. www.OnBarcode.com 11 Solutions: Web Resources
Encode ANSI/AIM Code 128 In VB.NET Using Barcode generation for .NET Control to generate, create Code 128A image in .NET applications. www.OnBarcode.comPlanet Generator In VB.NET Using Barcode maker for .NET Control to generate, create Planet image in .NET framework applications. www.OnBarcode.com// Ensure that these match the codes in CRM var SHIPPINGMETHODCODE_WILLCALL = 7; var FREIGHTTERMSCODE_FOB = 1; var FREIGHTTERMSCODE_NOCHARGE = 2; Scan Barcode In Java Using Barcode Control SDK for BIRT reports Control to generate, create, read, scan barcode image in BIRT reports applications. www.OnBarcode.comEncode ANSI/AIM Code 39 In .NET Framework Using Barcode generation for Reporting Service Control to generate, create USS Code 39 image in Reporting Service applications. www.OnBarcode.comvar shipCode = Xrm.Page.data.entity.attributes.get("address1_shippingmethodcode"); var freightOptions = Xrm.Page.ui.controls.get("address1_freighttermscode"); if (shipCode.getValue() == SHIPPINGMETHODCODE_WILLCALL) { freightOptions.removeOption(FREIGHTTERMSCODE_FOB); } } Painting UPC A In C# Using Barcode maker for Visual Studio .NET Control to generate, create UPC Code image in Visual Studio .NET applications. www.OnBarcode.comDraw UPC-A Supplement 2 In None Using Barcode drawer for Online Control to generate, create UCC - 12 image in Online applications. www.OnBarcode.comAfter creating the Script web resource, associate the script and methods to the Contact entity and events using the process in the previous two sections. For this example, you should associate the removeFreightTerms method to the Contact form s onLoad event to address update situations in which Will Call is already selected. Then associate the updateFreightTerms method to the Address 1: Shipping Method field s onChange event. Tip When you need to find the value of an option set item, navigate to the entity s Fields page. Barcode Recognizer In Java Using Barcode decoder for Java Control to read, scan read, scan image in Java applications. www.OnBarcode.comDrawing Denso QR Bar Code In .NET Framework Using Barcode creation for Reporting Service Control to generate, create QR Code image in Reporting Service applications. www.OnBarcode.comDouble-click the option set field. On the right, you will see the list of options. Double-click an option name, and a dialog box displays the corresponding value, as shown in Figure 11-16. Print Bar Code In Objective-C Using Barcode generation for iPhone Control to generate, create bar code image in iPhone applications. www.OnBarcode.comDecode ECC200 In Visual C# Using Barcode reader for .NET framework Control to read, scan read, scan image in .NET applications. www.OnBarcode.comFIGURE 11-16 Retrieving option set values
Part II Solutions
Displaying Customer Information on an Opportunity Form
The new header area of a form is great for displaying information to the user regardless of where the user is on the form. Microsoft Dynamics CRM 2011 allows you to do display fields, web resources, and IFrames in the header. However, you are unable to display related fields in the header or on the form. One common request we see is to display the customer s phone number directly with the opportunity form. In this example, we ll use a Web Page (HTML) web resource with some JavaScript to accomplish this request. Figure 11-17 shows the results when we are finished. FIGURE 11-17 Displaying the customer s phone number on the opportunity form
For this example we ll do the following: Create one new Script (JScript) web resource Use the previously created Style Sheet web resource
11 Solutions: Web Resources
Create a new Web Page web resource Add the Web Page web resource to the header of the opportunity form Note For this example, please download the companion content.
Referencing the Script (JScript) web resource on the Lead form
1. Navigate to the Settings area, click Customizations, and then click Customize the System to open the default solution. 2. In the default solution, click the Web Resources link. 3. Click New to create the jQuery web resource. Match the values shown in the following screenshot and then click Browse and select the /Web Resource Files/Scripts/ jquery1.4.1.min.js from the companion content. Click Save and Close in ribbon. Part II Solutions
4. Next, we ll create the Web Page web resource. Click New and create a new web resource with the following values. Be sure to click Browse and upload the following file from the companion content: /Web Resource Files/Pages/OpportunityHeader.htm. Click Save and Close. More Info This particular example uses the new OData endpoint in script to retrieve
the customer information. We also need to reference CRM s ClientGlobalContext.js.aspx to retrieve a valid CRM context. See the Microsoft Dynamics CRM 2011 SDK for more information on this approach. 5. Back in the default solution, expand Entities node, then expand Opportunity. 6. Click Forms, then click Header on the form ribbon. 7. Add a Web Resource with the following information and then click OK. 8. In the ribbon, click Save and then click Publish, and your new page should be ready for use!
|
|