Bookshelf Home | Contents | Index | PDF |
Oracle CRM On Demand JavaScript API Developer's Guide > JavaScript API Reference > Method for Setting the Search Specification for the Solutions Popup Window Associated with Service RequestsYou can use the setPopupSearchSpec() method to specify the search specification for a popup window as shown in Table 14. NOTE: The setPopupSearchSpec() method is only supported for the multiassociation Lookup window for solutions associated with a service request.
The parameters for the setPopupSearchSpec() method are as follows:
The following is an example of how you can use the setPopupSearchSpec() method. The sample code creates a filter for the multiassociation Lookup window that is displayed on clicking the Add button in the Solutions section on the Service Request Detail page. The search specification filters for solutions where the values of the Area, Sub Area 1, and Sub Area 2 fields are equal respectively to the values of the Area, Sub Area 1, and Sub Area 2 fields of the Service Request. oraclecrmod.onReady(function() if (oraclecrmod.ctx.isObject("Service Request") && oraclecrmod.ctx.isDetailPage()) // Define function that sets searchSpec of Solutions popup window function addMultiAssocSearchSpec() // Get the Area, Sub Area 1, Sub Area 2 fields of the Service Request var SRArea = oraclecrmod.getField('Area'); var SRSubArea1 = oraclecrmod.getField('ZPick_0'); var SRSubArea2 = oraclecrmod.getField('ZPick_1'); if (SRArea != null && SRSubArea1 != null && SRSubArea2 != null) // ZPick_0, ZPick_1, Z_Pick_2 are the HTML tags of fields Area, Sub Area // and Sub Area 2 for Solution respectively setPopupSearchSpec(this, "ZPick_0='" + SRArea.getValue() + "' AND ZPick_1='" + SRSubArea1.getValue() + "' AND ZPick_2='"+ SRSubArea2.getValue() +"'"); // Find the Add Solution popup button in the Service Request Page var addBtn = oraclecrmod.getButton('BTN_TB_SolutionChildList_AddButton'); // When the mouse is over the button update the searchSpec for the button |
Oracle CRM On Demand JavaScript API Developer's Guide, Release 38 | Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |