Comentarios (6)

1 JunaidAzam ha hecho un comentario el Enlace permanente

Hi Dave, <div>&nbsp;</div> I want to populate the same thing from Database. Is it possible to assign/update Choice list from Database? How am i able to directly assign in Case Builder or on add task page in 5.1?

2 Dave Perman ha hecho un comentario el Enlace permanente

Hi. You have two options there. <div>&nbsp;</div> To follow my client-side scripting example, I could imagine you making a call (web service, http request, etc) to something that returns you choice values back to the script and replaces my hardcoded items. <div>&nbsp;</div> The other approach for this is to not use client-side scripts, but instead use the External Data Services (EDS) feature that allows you to write an EDS service that modifies the data and configuration before it even hits the UI.

3 JunaidAzam ha hecho un comentario el Enlace permanente

Dave Thanks. <div>&nbsp;</div> I think second option is more useful. Dave, do you have any written sample EDS Code which use data source database? If you have, can you please share?

4 abeaty ha hecho un comentario el Enlace permanente

https://www.ibm.com/developerworks/community/blogs/e8206aad-10e2-4c49-b00c-fee572815374/entry/sample_external_data_service_for_ibm_case_manager_by_dave_hanson6?lang=en <div>&nbsp;</div> Here is a sample EDS. Written for 5.1, but I haven't seen any differences between 5.1 and 5.2.

5 Ajinkya Panse ha hecho un comentario el Enlace permanente

Hi, <br /> I am using case manager 5.2.0.1Fp001. How can I auto populate ( not prefill ) the fields on Add case page? For e.g. on Add case page there are two properties Contract Type and Approver. When I add value to Contract Type say "XYZ" then I want the Approver field to be auto updated to say "Approver1". Is it done using EDS integration with case manager or using JavaScript code? DO you have any sample code for this similar to the one given above for Add Task page. <div>&nbsp;</div> I tried the following code and tried to make some changes in it but it just prefills the property when the Add case page loads. <div>&nbsp;</div> /* Requires ICM 5.2.0.1 */ <div>&nbsp;</div> console.log(this.name,": ",payload); <div>&nbsp;</div> require(["icm/base/Constants", "icm/model/properties/controller/ControllerManager"], function(Constants, ControllerManager) { <br /> /* Get the coordination and editable objects from the event payload. */ <br /> var solutionPrefix = payload.caseType.getSolution().getPrefix(); <br /> var coordination = payload.coordination; <br /> var editable = payload.caseEditable; <div>&nbsp;</div> /* Change me to your property name */ <br /> var theProperty = solutionPrefix + "_CaseStage"; <div>&nbsp;</div> /* Use the LOADWIDGET coordination topic handler to obtain the controller binding */ <br /> /* for the editable and to update the properties. */ <br /> coordination.participate(Constants.CoordTopic.LOADWIDGET, function(context, complete, abort) { <br /> /* Obtain the controller binding for the editable. */ <br /> var collectionController = ControllerManager.bind(editable); <div>&nbsp;</div> /* Start a batch of changes. */ <br /> collectionController.beginChangeSet(); <div>&nbsp;</div> /* Make the updates to the properties. */ <br /> collectionController.getPropertyController(theProperty).set("value", "0"); <br /> collectionController.getPropertyController(theProperty).set("readOnly", true); <div>&nbsp;</div> /* Complete a batch of changes. This tells all subscribed widgets to refresh. */ <br /> collectionController.endChangeSet(); <div>&nbsp;</div> /* Call the coordination completion method. */ <br /> complete(); <br /> }); <div>&nbsp;</div> /* Use the AFTERLOADWIDGET coordination topic handler to release the controller binding for the editable. */ <br /> coordination.participate(Constants.CoordTopic.AFTERLOADWIDGET, function(context, complete, abort) { <br /> /* Release the controller binding for the editable. */ <br /> ControllerManager.unbind(editable); <div>&nbsp;</div> /* Call the coordination completion method. */ <br /> complete(); <br /> }); <br /> });

6 JunaidAzam ha hecho un comentario el Enlace permanente

Hi Ajinkya, <div>&nbsp;</div> You can do this as mentioned in this url posted by Dave using some Scripting: https://www.ibm.com/developerworks/community/blogs/e8206aad-10e2-4c49-b00c-fee572815374/entry/quick_case_data_lookups1?lang=en . I am already doing so in ICM 5.1 by using this sample code which you can use in your own environment ICM 5.2. EDS is other option which you already have and case use as well. <br /> if (payload.value == 'ABC') <br /> { <br /> return [{'name':'CasePriority','value':'NORMAL'}]; <br /> } <br /> else if (payload.value == 'XYZ') <br /> { <br /> return [{'name':'CasePriority','value':'IMMEDIATE'}]; <br /> } <br /> else if (payload.value == 'PQR') <br /> { <br /> return [{'name':'CasePriority','value':'URGENT'}]; <br /> } <br /> else if (payload.value == null) <br /> { <br /> alert ("Please Fill Case Property"); <br /> } <br /> //return payload;

Añadir un comentario Añadir un comentario