Skip navigation
All People > TMACUL > Tiago MACUL's Blog > 2016 > January > 05

Commands

Pdm_d_refresh

Pdm_webcache

Pdm_cache_refresh

Pdm_tomcat_nxd

Pdm_publish

Command-Line_Interface

 

Administration

Options_Manager.

Data_Type_Conversion

 

LDAP_Integration

 

Data_Partitions.

Web_Screen_Painter.

 

 

more..

How_to_Script_Buttons

 

Troubleshooting_Spell_Code

Set_Priority_Based_on_Urgency_and_Impact

Custom Lookup method for TextAPI

Modify_Action_and_Condition_Macros_via_the_GUI

R12_Go_button_Search_Customization

Conditionally_Attach_an_Event.

Add_Personalized_Response_to_Manual_Notification

Send_WaitCall_attrSync_fetch.

Action_Macro_to_Log_Solution_and_Resolve_Ticket.

Increasing_Default_Field_Size

Root_Cause.

Add_Log_Entry_When_a_Property_Value_Changes_on_a_Ticket.

Additional_Sorting_on_List_Panel.

Attachments_on_Configuration_Items_r12.

Refresh_Customer_Info_Before_Saving_the_Ticket.

Service_Desk_FAQ.

Sample_Queries.

SD_working_with_Google_Chrome.

Send_Survey_based_on_Variables

Close_attached_incidents.

Dependent_dropdowns

Send_WaitCall_Attr

Events_and_Macros.

Add_Custom_Activity_Log_Action_Macro.

Service_Desk_History.

List_Tickets_ORDER_BY_Group

Dob_attr_type_info.

Add_Log_Entry_for_Updates_to_Custom_Fields.

Copying_an_Access_Type_Scoreboard.

Web_Services.

Attachments_on_Configuration_Items

Get_dob_Spell_method

Display_Buttons_for_Group_members_only.

Get_val_Spell_method

Get_attr_vals

Changing_Error_Alert_Color_and_adding_Error_Alert_Pop-ups

Time-based_Stored_Queries

Cnt.get_members_to_notify_by_persid

How_To_Manage_Spell-Based_Macros.

Conditional_Display_of_Drop-Down_Content.

SPELL_CODE_to_Make_ACT_/_EVT_INTERNAL.

URLS_for_Computer_Telephony_Integration_(CTI).

Search_Requests,_Incidents,_and_Problems_Simultaneously_for_Ticket_Number.

SPELL_CODE_to_to_add_event_at_50%25_and_75%25_of_the_time_between schedule start time and duration

Count_Ticket_Reopens

Control_the_Request_Areas_Displayed_to_the_End_Users

Add_Checkbox,_Date,_Drop-down,_Lookup,_Readonly_and_Text_Fields_to_Properties

CA Unicenter Service Desk (also known as CA Service Desk, Unicenter ServicePlus Service Desk, Advanced Help Desk, ServiceIT, USPSD, USD and AHD) is an enterprise service desk software solution provided by CA, Inc.

Product History

In 1991, a company named Networx, Inc. was formed. During 1992, Networx developed a service desk product named Paradigm. In mid-1992 Networx began shipping an AIX-based UNIX version to IBM, their first client. In December 1992, Networx began shipping a Sun Solaris compatible version. In the following years, Networx developed HP-UX and Microsoft Windows NT/2000 versions. In early 1993, Paradigm won LAN Magazine's Product of the Year Award in the service desk category.In September 1993, Networx, and all of its assets, was sold to Legent Corporation. CA (then known as Computer Associates) acquired Legent Corporation in 1995. CA began selling Paradigm in mid-1995. In early 1996, a companion product to Paradigm was created and named Unicenter TNG Advanced Help Desk Option (AHD). The functionality of Paradigm and AHD was fundamentally the same; however, Paradigm was sold as a stand-alone service desk, whereas AHD was sold as an option to Unicenter TNG.In early 1999, Paradigm was renamed as ServiceIT Enterprise Edition. Both AHD and ServiceIT Enterprise Edition existed until October 2001, at which time they were combined into one product and sold as Unicenter Service Desk version 5.5. With this release, one could install Unicenter Service Desk as either stand-alone or integrated with Unicenter TNG. During this period CA acquired Professional Help Desk (PHD) and Platinum’s Apriori product. Both acquisitions brought significant knowledge management functionality to CA.In April 2002, CA introduced a service desk suite called Unicenter ServicePlus. Unicenter ServicePlus consisted of five modules as follows:

    • Unicenter ServicePlus Service Desk
    • Unicenter ServicePlus Customer Service
    • Unicenter ServicePlus Knowledge Tools
    • Unicenter ServicePlus Collaboration Tools
    • Unicenter ServicePlus Predictive Tools

Customer Service, Knowledge Tools and Collaboration Tools (aka Human Touch) above were initially part of the CA Intelligent CRM Suite; however, CA stopped selling these products under the “Intelligent CRM” label. Unicenter ServicePlus Knowledge Tools is a product that is based on technology acquired from the Professional Help Desk and Apriori acquisitions.The creation of the Unicenter ServicePlus solution set mostly involved re-branding the products: Unicenter ServicePlus Service Desk 5.5.1 was Unicenter Service Desk 5.5; the only difference being the name and updated branding within the product.

    • Unicenter ServicePlus Customer Service - was Intelligent CRM Suite Customer Service
    • Unicenter ServicePlus Knowledge Tools - was Intelligent CRM Suite Customer Intelligence
    • Unicenter ServicePlus Collaboration Tools - was Intelligent CRM Suite Human Touch
    • Unicenter ServicePlus Predictive Tools - was new and based on the CA artificial intelligence technology, Neugents.

6.0

In April 2003, CA made available new versions of both Unicenter ServicePlus Service Desk and Unicenter ServicePlus Knowledge Tools. Both of these new product releases were generally available and labeled version 6.0. The Unicenter ServicePlus Customer Service functionality was incorporated into this new release of Unicenter ServicePlus Service Desk to allow customers to leverage both internal and external support within a single system.

In November 2003, a French version of Unicenter ServicePlus Service Desk 6.0 was released. In May 2004, CA added a new product to the overall suite, Unicenter ServicePlus Dashboard. The Dashboard is a near real-time graphical display tool designed to provide key metrics to service desk operations management.

In July 2004, a decision was made to retire the Unicenter ServicePlus Collaboration Tools and Unicenter ServicePlus Predictive Tools.

R11

In October 2005, CA announced availability of the r11.0 version for all the products within the Service Support initiative, i.e. Unicenter Service Desk, Unicenter Service Desk Knowledge Tools, Unicenter Service Desk Dashboard, and a new product, Unicenter Service Intelligence. The Unicenter Service Intelligence product focused on a CIO’s view of all service support activities and the ability to understand the trends within the internal support organization. The r11.0 version of these products featured support for the Ingres database and two operating environments including Windows and Linux. The ServicePlus brand name was removed with this release.

R11.0 was a major upgrade of the Unicenter line of product by making them working together using the same core of information (the ca-mdb). The database model was an evolution highly inspire of the ITIL model but was not a fully CMDB. This also need some new process behind the scene like the CORA for synchronization between Configuration Item.

In January 2006, CA released the r11.1 version for Unicenter Service Desk, Unicenter Service Desk Knowledge Tools and Unicenter Service Desk Dashboard, which added additional support for the Microsoft SQL Server database.

In January 2006, CA announced the acquisition of Control-F1, a privately held provider of support automation solutions that automatically prevent, detect, and repair end-user computer problems before they disrupt critical IT services. The newly acquired Control-F1 products extended the CA service support solution offering, and included version 5.3 of CA SupportBridge Live Automation, CA SupportBridge Self-Service Automation, and CA SupportBridge Self-Healing Automation.

In March 2006, CA announced that the Unicenter Service Intelligence product would be merged into a future version of Unicenter Asset Intelligence to form a combined cross-product reporting solution. Because of this decision, no future versions of the stand-alone Unicenter Service Intelligence product would be built beyond r11.0.

In June 2006, Unicenter Service Desk, Unicenter Service Desk Knowledge Tools and Unicenter Service Desk Dashboard r11.2 were released. The r11.2 version provided support for more platforms, including UNIX (Sun Solaris, IBM AIX and HP-UX), and the Oracle database. The r11.2 version also provided new accessibility features that align with the US Government’s Section 508 and WCAG standards.

In August 2006, CA released a localized version of r11.1. This release provided fully translated versions of r11.1 in French, German and Japanese. A localized release of r11.2 available in French, German, Japanese, Italian, Spanish, Brazilian Portuguese and Simplified Chinese is currently planned for 2007.

In February 2007, CA SupportBridge 6.0 was released.

R12

R12 of USD has been made available through a beta program to some USD consultants. One of the largest changes of this release is the adoption of user profiles and roles, a feature intended to avoid the need for several administrative virtual users.

Overview

This article provides customization to detail_in.htmpl for refreshing end user location and phone (as displayed on the form) when the end user changes BEFORE saving the change. The code works, but I am not crazy about it. I am hoping that someone can find a more elegant way to implement the same. I have only implemented and did limited testing in development, so the code has not been tested in the real world environment.

My understanding of the code is very limited, and was gained by trial and error, so my explanation and terminology might not be correct.

There are functions that you can use to call the server, I only mention two of them here: upd_workframe() and display_new_page(). In calls to these functions you can specify a callback function that will receive the results of the server lookup. In this code, I used two calls to display_new_page(): zCustomerLocationCallback() was specified as the callback in the 1st call, and zCustomerPhoneCallback() in the second one.

I encountered a few problems. First, I could not find a way to look up both location and phone in one server call, even though they both would be a lookup of the same record based on the same contact UUID. As a result, I had to do two server calls. Another problem is that if you try to do one server call after another, only the callback that was evoked by the last one will be executed. In other words, if in backfill_cnt_event() I had the following code, I would only see the phone being refreshed:

upd_workframe("GET_SVC_CONTRACT", "new_customer=cnt:" + cntID,

"func=parent.ahdframe.get_svc_callback");

display_new_page(url,ahdframeset.workframe); // with url for zCustomerLocationCallback()

…..

display_new_page(url,ahdframeset.workframe); // with url for zCustomerPhoneCallback()

That means that if you want to execute more than one callback per event, you have to call the next one from the previous. In this particular scenario, I had to execute 3 callback functions when an end user changes:
1. Service contract check (upd_workframe("GET_SVC_CONTRACT"..) - out of the box behavior)
2. Location lookup
3. Phone lookup
So I had to “chain” them: location callback function triggers phone callback, and phone callback triggers Service contract check.

I based my code on nr_inv_tab.htmpl and nr_ops.js: this code causes the manufacturer to be refreshed when the model of the asset changes. zcustomerChanged() is based on ModelChanged(), and the 2 callback functions are based on modelChangedCallback(). The difference is that I could not use onBlur() or on Change(), because I needed contact UUID, not the combo name(there can be duplicates), and it wouldn’t be available there. That’s why I used function

backfill_cnt_event( form_name, base_name, lname, fname, mname, cntID, caller_type )

where cntID is the new contact UUID. Also, I noticed that in nr_inv_tab.htmpl vendor only gets refreshed if the model is selected from the model search window, and not if you type it in and tab out. My code works in both scenarios.

View the Complete Code

Click Here to download the complete code.

Customization Steps

Step 1. Add customer location and phone

Note that Ids are important here - they will be used by the callback functions to refresh the fields.

<PDM_MACRO NAME=dtlReadonly hdr="End User Location" attr="customer.location" id=custloc> <PDM_MACRO NAME=dtlReadonly hdr="End User Phone" attr="customer.phone_number" id=custphone>

Step 2. Modify function backfill_cnt_event() as follows

Comment out (or delete) Contract enforcement code and add a call the new custom function. It will look as follows:

function backfill_cnt_event( form_name, base_name, lname, fname, mname,

  cntID, caller_type )

{

   if (_dtl.edit && !_dtl.skip_agt_check)

   {

var f = void(0);

var r = form_name.match(/main_form([0-9]*)/);

if ( r != null ) {

if ( r[1].length == 0 )

f = _dtl.form[0];

else

f = _dtl.form[r[1]-0];

}

detailAgtCheck(f, base_name, cntID, prop_ref);

   }

  detailCntBackfill( form_name, base_name, lname, fname, mname,

  cntID, caller_type );

 

   // sk: if user org has a service contract, the following code will clear out the category after changing user

   // if it is not a private category from the contract under the contract, and will display message:

   // "The current category can not be used with the current End User. The category has been reset."

// Contract enforcement: 

/*
if (ahdtop.cfgNX_CLASSIC_SLA_PROCESSING != 'Yes' &&
base_name == "customer" && typeof cntID != "undefined" && cntID.length > 1) {

  upd_workframe("GET_SVC_CONTRACT", "new_customer=cnt:" + cntID,
"func=parent.ahdframe.get_svc_callback");
}
*/

   // Note: even if remove "typeof cntID != "undefined" && cntID.length > 1", zRefreshCustomerInfo() still does not get called

   if (base_name == "customer" && typeof cntID != "undefined" && cntID.length > 1)

   {

  zcustomerChanged(form_name, base_name, lname, fname, mname, cntID, caller_type);

   }

}

Step 3. Add the following code at the end of backfill_cnt_event()

if (base_name == "customer" && typeof cntID != "undefined" && cntID.length > 1)

   {

  zcustomerChanged(form_name, base_name, lname, fname, mname, cntID, caller_type);

   }

Step 4. Add the following java script code before function backfill_cnt_event()

var zcurrCustID="";

 

// Based on modelChanged() in nr_ops.js

function zcustomerChanged(form_name, base_name, lname, fname, mname, cntID, caller_type ) {

  //alert(cntID); //newly selected contact UUID

  var zFID=document.forms["main_form"].elements["FID"].value;

  var zSID=document.forms["main_form"].elements["SID"].value;

  var zcntID=cntID.replace("U","");

  zcntID=zcntID.replace("'","");

 

  if (zcurrCustID == zcntID)

   return;

  zcurrCustID=cntID;

 

  var url;

  if(ahdframe.currentAction==0) // =0 if customer selected from contact list; =6 if typed in

  {

  set_action_in_progress(ACTN_AUTOFILL);

  }

  url=cfgCgi+"?SID="+zSID+"+FID="+zFID

  +"+OP=SEARCH+FACTORY=cnt"

  +"+KEEP.domset_name=RLIST_STATIC"

  +"+QBE.EQ.id="+escape(zcntID)

  +"+KEEP.backfill_attr=location.name"

  +"+HTMPL=javascript:parent.ahdframe.zCustomerLocationCallback";

  display_new_page(url,ahdframeset.workframe);

  if(ahdframe.currentAction==0) // =0 if customer selected from contact list; =6 if typed in

  {

  set_action_in_progress(ACTN_AUTOFILL);

  }

}

 

// Based on modelChangedCallback() in nr_ops.js

function zCustomerLocationCallback(persid,value,rel_attr_val)

{

  set_action_in_progress(0);

  //alert(persid); // cnt UUID with "cnt:" prefix

  //alert(rel_attr_val); // cnt UUID without "cnt:" prefix

  //alert(value); // location name

  var e=document.getElementById("custloc");

  if(e!=null)

  e.innerHTML=value;

 

  var zFID=document.forms["main_form"].elements["FID"].value;

  var zSID=document.forms["main_form"].elements["SID"].value;

  var url=cfgCgi+"?SID="+zSID+"+FID="+zFID

  +"+OP=SEARCH+FACTORY=cnt"

  +"+KEEP.domset_name=RLIST_STATIC"

  +"+QBE.EQ.id="+escape(rel_attr_val)

  +"+KEEP.backfill_attr=phone_number"

  +"+HTMPL=javascript:parent.ahdframe.zCustomerPhoneCallback";

  display_new_page(url,ahdframeset.workframe);

  if(ahdframe.currentAction==0) // =0 if customer selected from contact list; =6 if typed in

  {

  set_action_in_progress(ACTN_AUTOFILL);

  }

}

 

// Based on modelChangedCallback() in nr_ops.js

function zCustomerPhoneCallback(persid,value,rel_attr_val)

{

  set_action_in_progress(0);

  var e=document.getElementById("custphone");

  if(e!=null)

  e.innerHTML=value;

 

  if (ahdtop.cfgNX_CLASSIC_SLA_PROCESSING != 'Yes') {  

  upd_workframe("GET_SVC_CONTRACT", "new_customer=cnt:" + rel_attr_val, "func=parent.ahdframe.get_svc_callback");

  }

}

Para os desenvolvedores de plantão.

É possível criar novas operações web do tipo "OP=DISPLAY_FORM / SEARCH / etc" que possibilitem que o usuário dispare novos métodos SPEL através da interface web.

O retorno se dá através do comando "send_frame_resp" que alimenta um javascript em um frame oculto do formulário de origem. A execução é síncrona e pode possibilitar que o SDM execute literalmente qualquer coisa.

 

As operações nativas do produto ficam armazenadas no arquivo $NX_ROOT\bopcfg\www\op_table.cfg. E as novas operações customizadas devem ficar em $NX_ROOT\site\mods\www\op_custom.cfg.

 

Dentro destas respectivas pastas os respectivos arquivos de métodos SPEL devem ser armazenados.

Operações não são executadas pelo processo SPEL_SRVR, mas sim pelo WEBENGINE. Portanto, toda vez que houver modificação em algum método, o webengine deverá ser reiniciado.

A estrutura ficaria parecida com o exemplo abaixo:

No arquivo op_custom.cfg:

Z_TESTE z_teste MODIFY UPDATE

 

 

No arquivo z_teste.spl

z_teste(...) {

int zi_id_event;

object zo_new_obj;

zi_id_event = argv[0];

zo_new_obj = argv[1];

dump_args(zo_new_obj);

string return_msg;

return_msg = format("TESTE OK no objeto %s", zo_new_obj.PERSID);

 

 

if (!is_null(return_msg)) {

format_to_js(return_msg));

zo_new_obj.CALLBACK="alert(myMsg)";

 

 

string zs_new_js;

zs_new_js = format("var myMsg='%s';", return_msg);

send_frame_resp((long)zi_id_event, (object)zo_new_obj, (string)zs_new_js);

}}

 

 

E finalmente no formulário HTMPL::

var url = cfgCgi + "?SID=" + cfgSID + "+FID=" + fid_generator() + "+OP=Z_TESTE" + "+FACTORY=cr" + "+PERSID=" + argPersistentID + "+POPUP_NAME=" + '$args.KEEP.POPUP_NAME' + "+KEEP.POPUP_NAME=" + '$args.KEEP.POPUP_NAME' + "+CALLBACK=test";

<PDM_MACRO name=button Caption="TEST OP" Func="display_new_page(url, ahdframeset.workframe);" hotkey_name="TEST_OP[P]" ID=TEST_OP>

 

 

Mais informações no link: SPEL: Register custom webengine OP

 

Publicado Originalmente: 14 de setembro às 10:07

Em: CA SDM Brasil - facebook

Por: daniel-bighelini

 

 

Social Communities for CA Service Management Arround the world - CA Technologies

Copying an Access Type Scoreboard

 

From SDU

Jump to: navigation, search

 

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.


 

Overview

This Article provides the instructions for copying the default Scoreboard of one Access Type and using it for the default of a new Access Type.

Note: r12 includes a copy feature which makes these procedures obsolete when creating a new Access Type. However, they may still be used when wanting to update existing Access Type Scoreboards.

Procedures

Step 1. Obtain of Both Access Types

Run the following command where the sym is the name of the Access Type you are obtaining the id for:

pdm_extract -f "select id from Access_Type where sym='Administrator'"

In this example, the id returned is 2402. Lets assume the id of the other Access Type returned an id of 400001.

Step 2. Backup the User_Query Table

pdm_extract -f "select * from User_Query where obj_persid='acctyp:2402'" > User_Query_bkup.txt

Step 3. Extract the Original Access Type's Scoreboard

pdm_extract -f "select expanded, factory, label, last_mod_by, last_mod_dt, obj_persid, parent, query, query_set, query_type, sequence from User_Query where obj_persid='acctyp:2402'" > score_out.txt

Step 4. Edit the Extract File

Edit the score_out.txt file and change any occurrence of acctyp:2402 to the new access type value of acctyp:400001. Save the modified output to a new file scoreboard_in.txt

Step 5. Load the New Data

pdm_load -i -f scoreboard_in.txt -v

Step 6. Extract Parent References

Now comes the hard part of parent/child relationships... otherwise known as folder/node relationships. Run the following two command:

pdm_extract -f "select id, parent, sequence from User_Query where obj_persid='acctyp:2402'" > part1.txt
pdm_extract -f "select id, parent, sequence from User_Query where obj_persid='acctyp:400001’" > part2.txt

Step 7. Compare the Extracts

Open both these files and place them side by side. Compare part1.txt and part2.txt. Notice all the entries with the parent set to "0". These are the folders that appear on the Scoreboard. All the other entries are the nodes that reside within the folders. Notice how the nodes all reference the id of a parent... in other words the id of the folder they belong to. In the part2.txt extract all the nodes are still referencing the id's of folders belonging to the original Access Type's Scoreboard (part1.txt). What you need to do is change all these parent references to ids belonging to the folders of the new Access Type's Scoreboard. Do this by editing part2.txt and saving it as part2_new.txt.

part1.txtpart2.txtpart2_new.txt
TABLE User_Query id parent sequence { "7872" ,"0" ,"100" } { "7966" ,"7872" ,"200" } { "7967" ,"7872" ,"300" } { "7800" ,"7872" ,"400" } { "7801" ,"7872" ,"500" } { "7802" ,"7872" ,"600" } { "7803" ,"7872" ,"800" } { "7804" ,"7872" ,"800" } { "8051" ,"7872" ,"900" } { "8052" ,"7872" ,"1000" } { "7805" ,"7872" ,"1100" } { "7806" ,"7872" ,"1200" } { "7807" ,"7872" ,"1300" } { "7808" ,"7872" ,"1400" } { "7809" ,"7872" ,"1500" } { "7810" ,"7872" ,"1600" } { "7811" ,"7872" ,"1700" } { "7812" ,"7872" ,"1800" } { "7813" ,"7872" ,"1900" } { "7968" ,"0" ,"2000" } { "7969" ,"7968" ,"2100" } { "42000" ,"7969" ,"2150" } { "7970" ,"7969" ,"2200" } { "7971" ,"7969" ,"2300" } { "7972" ,"7969" ,"2400" } { "7973" ,"7968" ,"2500" }
TABLE User_Query id parent sequence { "400365" ,"0" ,"100" } { "400366" ,"7872" ,"200" } { "400367" ,"7872" ,"300" } { "400368" ,"7872" ,"400" } { "400369" ,"7872" ,"500" } { "400370" ,"7872" ,"600" } { "400371" ,"7872" ,"800" } { "400372" ,"7872" ,"800" } { "400373" ,"7872" ,"900" } { "400374" ,"7872" ,"1000" } { "400375" ,"7872" ,"1100" } { "400376" ,"7872" ,"1200" } { "400377" ,"7872" ,"1300" } { "400378" ,"7872" ,"1400" } { "400379" ,"7872" ,"1500" } { "400380" ,"7872" ,"1600" } { "400381" ,"7872" ,"1700" } { "400382" ,"7872" ,"1800" } { "400383" ,"7872" ,"1900" } { "400384" ,"0" ,"2000" } { "400385" ,"7968" ,"2100" } { "400386" ,"7969" ,"2150" } { "400387" ,"7969" ,"2200" } { "400388" ,"7969" ,"2300" } { "400389" ,"7969" ,"2400" } { "400390" ,"7968" ,"2500" }
TABLE User_Query id parent sequence { "400365" ,"0" ,"100" } { "400366" ," 400365" ,"200" } { "400367" ," 400365" ,"300" } { "400368" ," 400365" ,"400" } { "400369" ," 400365" ,"500" } { "400370" ," 400365" ,"600" } { "400371" ," 400365" ,"800" } { "400372" ," 400365" ,"800" } { "400373" ," 400365" ,"900" } { "400374" ," 400365" ,"1000" } { "400375" ," 400365" ,"1100" } { "400376" ," 400365" ,"1200" } { "400377" ," 400365" ,"1300" } { "400378" ," 400365" ,"1400" } { "400379" ," 400365" ,"1500" } { "400380" ," 400365" ,"1600" } { "400381" ," 400365" ,"1700" } { "400382" ," 400365" ,"1800" } { "400383" ," 400365" ,"1900" } { "400384" ,"0" ,"2000" } { "400385" ," 400384" ,"2100" } { "400386" ," 400385" ,"2150" } { "400387" ," 400385" ,"2200" } { "400388" ," 400385" ,"2300" } { "400389" ," 400385" ,"2400" } { "400390" ," 400384" ,"2500" }

Step 8. Load part2_new.txt

Load the new part2_new.txt file back to update the relevant rows for the new access type.

pdm_load -f part2_new.txt -v

Retrieved from "http://www.servicedeskusers.com/Copying_an_Access_Type_Scoreboard"

 

This page was last modified 12:05, 7 November 2008.  This page has been accessed 4,316 times.  Content is available under Attribution-Noncommercial-Share Alike 3.0 UnportedDisclaimers

Attachments on Configuration Items

 

From SDU

Jump to: navigation, search

 

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.


 

Overview

This article provides instructions for adding attachment capabilities to Configuration Items.

Note: This customization is designed for r11.x and r12.1 versions only. For r12.5 and above use the revised version

Procedures

Step 1. Modify Schema

For ALL releases make your schema change by creating a .mod file and placing it in the $NX_ROOT/site/mods/majic directory. Name the .mod anything you like, but it is recommended that it be preceded with a 'z'. Take the code you need from the examples below.

LREL attmnt_lrel "nr:PDM" attachments <> attmnt assets;

Step 2. Publish the Schema changes

For ALL releases recycle the Service Desk service.

Step 3. Edit the detail_nr.htmpl form

Add the following code to the BODY of the form in the PDM_NOTEBOOK area (for R12 this modification can be made to cmdbNotebook.htmpl): additional extension forms will need to be modified appropriately detail_har_virx.htmpl, detail_har_serx.htmpl,

 

<PDM_TAB ID=attmnt SRC="OP=SHOW_DETAIL+HTMPL=xx_attmnt_tab.htmpl+FACTORY=nr+PERSID=$args.persistent_id" NAME="Attachments"  height=300></pdm_tab>

Step 4. Edit the xx_attmnt_tab.htmpl form

This step will add "Edit" and "Delete" right-click options if the Inventory Functional Access is granted on the user's Access Type. If this scripting is not added then you will only have the option to view a document.

Search for the following scripting:
switch ("$prop.factory") { case "cr":  attmntAccess = "${ACCESS.call_mgr:0}" - 0; break; case "iss": attmntAccess = "${ACCESS.issue_mgr:0}" - 0; break; case "chg": attmntAccess = "${ACCESS.change_mgr:0}" - 0; break; }
... and add the following case:
case "nr": attmntAccess = "${ACCESS.inventory:0}" - 0; break;

Step 5. Clear the web cache

Publish your changes via the Web Screen Painter. The process of publishing automatically initiates a pdm_webcache.

NOTICE

Be advised that implementing this customization will result in a few ERRORS in the stdlogs, but there has been no reported degradation in functionality.

kt_daemon         16316 ERROR        DomWrap.c       1106 cSelect: failed In method select_sd_ref_num. Error Message: Error 103 AHD03053: Bad where clause: invalid constraint.  Could not recognize persistent_id.  OUTER_JOIN ca_owned_resource.id = usp_owned_resource.id kt_daemon         16316 ERROR        DomWrap.c        806 Failed to complete reply method: 'select_sd_ref_num' ,BOP Name:'attmnt:400063' in class:'CAttmntLinks', Error:AHD03053: Bad where clause: invalid constraint.  Could not recognize persistent_id.  OUTER_JOIN ca_owned_resource.id = usp_owned_resource.id domsrvr           13132 ERROR        attr.c          6164 Error in ATTR_INIT trigger get_attached_name for attached_name: AHD03053: Bad where clause: invalid constraint.  Could not recognize persistent_id.  OUTER_JOIN ca_owned_resource.id = usp_owned_resource.id

Retrieved from "http://www.servicedeskusers.com/Attachments_on_Configuration_Items"

 

 

This page was last modified 13:06, 6 December 2012.  This page has been accessed 10,091 times.  Content is available under Attribution-Noncommercial-Share Alike 3.0 UnportedDisclaimers

From SDU

Jump to: navigation, search

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.

 

 

Create a Request, Change Order and Contact through Web Services via VB

Step1: Create a web reference in the front end.

  1. Start the front end.
  2. Go to Website menu and click “Add web reference”.
  3. In the URL box provide the web service URL and click go. http://<hostname>:8080/axis/services/USD_R11_WebService?wsdl'''
  4. We can find the methods being pulled out.
  5. Add the webreference with the name “WebReference”.

Step 2: Create an Object of the web reference

Dim ws As New WebReference.USD_WebService

Step 3: Specify the Correct web service URL

ws.Url = "http://<hostname>:8080/axis/services/USD_R11_WebService?wsdl"

Step 4: Provide the username and password to get the sid value

Dim username, password As String Dim sid As Integer username = "analyst1" password = "123" sid = ws.login(username, password)

where login is the method used to get the sid.

Step 5: Get the User Handle

Dim userhandle As String userhandle = ws.getHandleForUserid(sid, username)

Where getHandleForUserid is the method

Step 6: Create a Request

Dim attrVal(5), attr(1), prop(1), persistent_id As String Dim requestHandle, requestNumber As String attrVal = New String() {"customer", userhandle, "category", "<category id>", "description", "Description here"} prop = New String() {""} attr = New String() {persistent_id} requestHandle = "" requestNumber = "" ws.createRequest(sid, userhandle, attrVal, prop, "", attr, requestHandle, requestNumber)

Step 7: Create a Change Order

Dim attrVal(5), attr(1), prop(1), persistent_id As String Dim requestHandle, requestNumber As String attrVal = New String() {"requestor", userhandle, "category", "category id", "description", "description here"} prop = New String() {""} attr = New String() {cpersistent_id} requestHandle = "" requestNumber = "" ws.createChangeOrder(sid, userhandle, attrVal, prop, "", cattr, requestHandle, requestNumber)

Step 8: Create a contact

Dim attrVal(5), attr(1), persistent_id As String Dim contactHandle, contactNumber As String attrVal = New String() {"first_name","Mike", "last_name", "Tolland", "userid", "mike.tolland", "contact_num", "<Password here>", "email_address", "mike.tolland@abc.co.in", "phone_number", "00989876723"} attr = New String() {persistent_id} ws.createObject(sid, "cnt", attrVal, attr, contactHandle, contactNumber)

 

Creating Code for VB.net 2008 and R11

Create object / login and return basic information

Dim sid As String Dim uHandle As String Dim b As New casoap.USD_WebServiceSoapClient sid = b.login("Administrator", "password")     Dim user As String = "devak01" uhandle = b.getHandleForUserid(sid, user) Dim arryVals As String() = {"first_name", "last_name", "organization", _ "organization.name", "admin_org.name", _ "group_list.length"} Dim arryValsresults As String = b.getObjectValues(sid, uHandle, arryVals)

 

Create a Asset / Hardware Configuration item

Dim newexten As String = "" Dim extenName As String = "" Dim assethndle As String = "" Dim car As String = "" Dim chgHandle As String = "" Dim chgNum As String = ""   Dim attrVal() As String = {"name", "hello2", "class", "grc:10000002"} ReDim Preserve attrVal(3) Dim persistent_id As String = "persistent_id" Dim attr() As String = {persistent_id} ReDim Preserve attr(0)   b.createAsset(sid, attrVal, attr, car, assethndle, newexten, extenName)

Create a Change Order

Dim attrVal() As String = {"requestor", uHandle, "category", "5103", "description", "hello world"} ReDim Preserve attrVal(5)   Dim persistent_id As String = "persistent_id" Dim attr() As String = {persistent_id} ReDim Preserve attr(0) Dim prop() As String = {} ReDim Preserve prop(1) Dim chgHandle As String = "" Dim chgNum As String = ""     b.createChangeOrder(sid, uHandle, attrVal, prop, _ "", attr, chgHandle, chgNum)

How to Use Web Services

I am using Visual Web Developer Express.Net. It is free and easy to use. To consume the USD web services, create a new web application.

Now is time to get to work

Once your page is set up:

Click the Website > add reference

Enter the URL to the web services WSDL file, which is located at' http ://< your server>:8080/axis/services/USD_R11_WebService?wsdl'

You might want to study a little XML and WSDL, but it isn't neccesary. Look up the topic, Consume or Consuming Web Services.

Quick Reference

Consuming Web service With Visual Studio/ Express Web Developer

Go to the Menu Bar and click Website > Add Web Reference (name it anything you want then click --> Add reference

And that is it!


To use the web reference, create a new instance of the web service VB.Net Class program file

Partial Class tickets Inherits System.Web.UI.UserControl   Private ws As New USD_WebService . . . To consume the service, call your first function ws.login(username, password)
'the login function returns a system id value so...' 'lets rewrite the above code to look like the code below...'   Dim sid As String sid = ws.login(username, password)

 

Example Code: Using Webservice in VB.NET Web Application

Here is a complete Code Snippit 
Imports System.IO Imports System.Xml Imports System.Xml.Serialization Imports <ReferenceToWebServiceWSDL> Imports Connection   Partial Class _Default   Inherits System.Web.UI.Page   Dim ws As New USD_WebService Dim sid As String Dim userhandle, username, password As String Dim attrVal(5), attr(0), prop(0) As String Dim requestHandle, requestNumber As String Dim persistent_id As String Dim catAttrib(5) As String   Dim xmlReturn As String Dim pcatHandle As XmlNodeList Dim xDoc As XmlDocument = New XmlDocument() Dim pcatResult As String   'Class for handling the button click submit' Protected Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click   Dim name = “Username” Dim pass As String = "password"   sid = ws.login(name, pass)   'get the Handle for the userid' userhandle = ws.getHandleForUserid(sid,name) 'Get The Category Attributes' catAttrib = New String(0) {}   'Category Handle for the incident area' Try xReturn = ws.doSelect(sid, "pcat", "sym = 'HARDWARE.PRINTER.SETUP'", 1, catAttrib) xDoc.LoadXml(xReturn) xHandle = xDoc.GetElementsByTagName("Handle") xResult = xHandle(0).InnerText catHandle = xResult Catch ex As Exception Response.Write("Exception caught while invoking an XML Web service.") End Try   'Priority handle for the ticeket' 'sym = priority.Value' '505     0     0     None Priority unassigned' '500     0     1     5     LOW Priority '501     0     2     4     MEDIUM-LOW Priority '502     0     3     3     MEDIUM Priority '503     0     4     2     MEDIUM-HIGH Priority '504     0     5     1     HIGH Priority   Dim pri As String() pri = New String() {"pri:505", "pri:504", "pri:503", "pri:502", "pri:501", "pri:500"}   'Set the priority number Testing only' priority_number = 1     attrib = New String() {"customer", userhandle, "priority", "pri:502", "category", _ pcatResult, "description", "Test"} prop = New String() {""} attr = New String() {persistent_id} requestHandle = "" requestNumber = ""   'Create the ticket' 'Including a try catch block for catching an error dealing with additional fields' ws.createRequest(sid, userhandle, attrVal, prop, "", attr, requestHandle, requestNumber)   'I need to close the connection.' ws.logout()   End Sub   Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load   ws.Url =  _ "http://<yourServerName>:8080/axis/services/USD_R11_WebService?wsdl" End Sub End Class

ASP Web Project

Create an ASP .NET Web Project Below is a sample ASP Page. Copy and paste the code Between the <Form></Form> tags.

'default.aspx' <asp:Label id="replay" runat="server" />   'Get the User Name and Password' <input type="text" id="username" runat="server" /> <input type="password" id="password" runat="server" />

I've created a demo VS 2010 ASP.NET web project to showcase a lot of functionality of the web services. Download here the project files: SD_WebService


Having Fun

Pop the code below in your VB file. When the user logs in correctly the form will disapear and s\he will be greeted by there username

'in your default.aspx.vb file' Dim ws As New USD_WebService   'Login' ws.login(username.Text, password.Text)   'Just for fun hide input areas' username.Visable = false password.Visalbe = false   'Say Hello to you user' replay.Text = " Welcome " & username.Text


If you copy and paste the code, you need to remove the aphostrophy at the end of each comment only. To do this just use your find and replace function. MenuBar Item Edit > Find and Replace --> Quck Replace > find What: ' . Next, Replace With <- test box insert a space. You'll have to do this one-by-one so not to uncomment the whole line.

create request and search request app using web services in c#

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using za.co.mtn.vmcausddv02_fld; using System.IO; using System.Xml; using System.Xml.Serialization; using System.Collections;

public partial class MAIN : System.Web.UI.Page {

   USD_WebService wsUSD = new USD_WebService(); string username = null; string password = null; int sid = 0; string userhandle = null; string[] attrVal; string[] attr; string[] prop; string persistent_id; string requestHandle; string requestNumber; string result; string login_username; string login_password; string login_userhandle; string ref_num; string res_count; string ref_handle; 
   XmlDocument Doc = new XmlDocument(); XmlNodeList nodeList = default(XmlNodeList); XmlElement root; 

 

   string xResult = null; XmlNodeList xHandle = default(XmlNodeList); XmlDocument xDoc = new XmlDocument(); 

 

protected void btnSubmit_Click(object sender, EventArgs e) { try { username = "horne_g"; password = "GavJac456"; sid = wsUSD.login(username, password); userhandle = wsUSD.getHandleForUserid(sid, username); 
           attrVal = new string[] { 

"customer", userhandle, "category", ddlCatogorie.SelectedValue, "description", txtDescription.Text

       }; prop = new string[] { "" }; attr = new string[] { "persistent_id" }; 
           requestHandle = ""; requestNumber = ""; 
           wsUSD.createRequest(sid, userhandle, attrVal, prop, "", attr, ref requestHandle, ref requestNumber); lblrequest.Text = requestNumber; // txtSearch.Text = requestNumber; //log out (sid) wsUSD.logout(sid); mtvSearchReq.Visible = true; } catch (Exception ex) { lblnumberUSDs.Text = ex.ToString(); } } 

protected void btnSearch_Click(object sender, EventArgs e)

   { username = "horne_g"; password = "GavJac456"; sid = wsUSD.login(username, password);  //ussing the array i created string[] attrs = new string[5]; attrs[2] = "ref_num"; attrs[1] = "description"; attrs[0] = "status"; attrs[3] = "group"; 
       try { sid = wsUSD.login(username, password); 
           result = wsUSD.doSelect(sid, "cr", "ref_num = '" + txtSearch.Text + "'", 2, attrs); xDoc.LoadXml(result); xHandle = xDoc.GetElementsByTagName("Attributes"); xResult = xHandle[0].InnerText;   
           ref_handle = xResult; 
           lblnumberUSDs.Text = attrs.ToString(); 
           //Doc.LoadXml(result); 
           //root = Doc.DocumentElement; //nodeList = root.SelectNodes("//Attribute[AttrName='ref_num']/AttrValue"); 

 

           //res_count = nodeList.Count.ToString(); lblnumberUSDs.Text = res_count; 
          // lblResult.Text = ref_handle; //txtresult.Text = result; txtresult.Text = ref_handle; wsUSD.logout(sid); } catch(Exception ex) { lblnumberUSDs.Text = ex.ToString(); } } 

Retrieved from "http://www.servicedeskusers.com/Web_Services"

 

 

This page was last modified 11:39, 4 October 2012.  This page has been accessed 34,259 times.  Content is available under Attribution-Noncommercial-Share Alike 3.0 UnportedDisclaimers

Add Log Entry for Updates to Custom Fields

 

From SDU

Jump to: navigation, search

 

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.


 

Overview

This article provides instructions for adding entries to the activity log when updates occur to custom fields.

Procedures

Step 1 .Create Activity Associations

  1. Login as admin
  2. Open Notification setup > Activity Associations.
  3. Click on Create New.
  4. Enter the custom field name in the symbol text box(zcustomfield1).
  5. Enter a code in the code text box (custom)
  6. Choose the object type from the drop-down box (Change/isssue/request/wf/..).
  7. Enter a description of the field (The MCC Application Code field on a Request).
  8. Enter the custom attribute name (zcustomfield1).
  9. Enter the activity type. You can use "Field Update" or you can create a new activity type if you need to specify notifications for the activity type you select. (Field Update).
  10. Check the "Log Me" checkbox.
  11. click Save.

Step 2. Create the trigger

  • Stop the Service Desk service
  • Start the Service Desk service

For older releases recycle the Service Desk service.

Retrieved from "http://www.servicedeskusers.com/Add_Log_Entry_for_Updates_to_Custom_Fields"

 

This page was last modified 08:32, 29 November 2010.  This page has been accessed 13,384 times.  Content is available under Attribution-Noncommercial-Share Alike 3.0 UnportedDisclaimers

Web Screen Painter

 

From SDU

Jump to: navigation, search

 

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.


 

Overview

This articles provides an under-the-hood explanation of the Web Screen Painter (WSP) and the Schema Designer introduced in r11.x.

Web Screen Painter

WSP Facts:

  • Located on the Primary Server.
  • Uses Tomcat exclusively.
  • All published changes are automatically exported to all Secondary Servers.

On Save

When initiating a save (File > Save) the following occurs:
  • The $NX_ROOT\site\mods\wsp\project directory is created if it does not already exist.
  • A new or modified file is stored within the $NX_ROOT\site\mods\wsp\project\... directory which has a structure that mimics the location of the default version of the file.
    For example: If editing the bin_form_np.htmpl used by the Analyst Interface which originally resides in $NX_ROOT\bopcfg\www\htmpl\web\analyst, a saved copy will be placed in$NX_ROOT\site\mods\wsp\project\www\htmpl\web\analyst.
  • Do not forget that also 2 tables are updated by web screen painter to "remind" the modification. It is possible that some change (made manually for example) are not know by the WSP with all the side effect that can result in case of modification.

On Publish

When initiating a publish (File > Publish) the following occurs:
  • Any saved versions of the files being published that reside within $NX_ROOT\site\mods\wsp\project\... are removed.
  • A new or modified file will be stored on the Primary and all Secondary Servers within the $NX_ROOT\site\mods\... directory which has a structure that mimics the location of the default version of the file.
    For example: If editing the bin_form_np.htmpl used by the Analyst Interface which originally resides in $NX_ROOT\bopcfg\www\htmpl\web\analyst, a saved copy will be placed in$NX_ROOT\site\mods\www\htmpl\web\analyst. CA ensures that the default files are never altered by your customizations by saving custom files in a dedicated location.
  • A deleted file will be removed from the Primary and all Secondary Servers.
  • The pdm_webcache command is automatically initiate which clears the cache on the Primary and all Secondary Servers.

Backing out

Both published and unpublished forms can be deleted via the WSP. However, you can also navigate through the directory structure and delete the file.
  • For saved but unpublished, navigate through the $NX_ROOT\site\mods\wsp\project\... directory and remove the target file.
  • For published files, navigate through the $NX_ROOT\site\mods\... directory on the Primary and all Secondary Servers, delete your file from all servers, and run the pdm_webcache from the Primary Server.

 

 

This page was last modified 05:24, 30 November 2010.  This page has been accessed 7,734 times.  Content is available under Attribution-Noncommercial-Share Alike 3.0 UnportedDisclaimers

Copying an Access Type Scoreboard

 

From SDU

Jump to: navigation, search

 

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.


 

Overview

This Article provides the instructions for copying the default Scoreboard of one Access Type and using it for the default of a new Access Type.

Note: r12 includes a copy feature which makes these procedures obsolete when creating a new Access Type. However, they may still be used when wanting to update existing Access Type Scoreboards.

Procedures

Step 1. Obtain of Both Access Types

Run the following command where the sym is the name of the Access Type you are obtaining the id for:

pdm_extract -f "select id from Access_Type where sym='Administrator'"

In this example, the id returned is 2402. Lets assume the id of the other Access Type returned an id of 400001.

Step 2. Backup the User_Query Table

pdm_extract -f "select * from User_Query where obj_persid='acctyp:2402'" > User_Query_bkup.txt

Step 3. Extract the Original Access Type's Scoreboard

pdm_extract -f "select expanded, factory, label, last_mod_by, last_mod_dt, obj_persid, parent, query, query_set, query_type, sequence from User_Query where obj_persid='acctyp:2402'" > score_out.txt

Step 4. Edit the Extract File

Edit the score_out.txt file and change any occurrence of acctyp:2402 to the new access type value of acctyp:400001. Save the modified output to a new file scoreboard_in.txt

Step 5. Load the New Data

pdm_load -i -f scoreboard_in.txt -v

Step 6. Extract Parent References

Now comes the hard part of parent/child relationships... otherwise known as folder/node relationships. Run the following two command:

pdm_extract -f "select id, parent, sequence from User_Query where obj_persid='acctyp:2402'" > part1.txt
pdm_extract -f "select id, parent, sequence from User_Query where obj_persid='acctyp:400001’" > part2.txt

Step 7. Compare the Extracts

Open both these files and place them side by side. Compare part1.txt and part2.txt. Notice all the entries with the parent set to "0". These are the folders that appear on the Scoreboard. All the other entries are the nodes that reside within the folders. Notice how the nodes all reference the id of a parent... in other words the id of the folder they belong to. In the part2.txt extract all the nodes are still referencing the id's of folders belonging to the original Access Type's Scoreboard (part1.txt). What you need to do is change all these parent references to ids belonging to the folders of the new Access Type's Scoreboard. Do this by editing part2.txt and saving it as part2_new.txt.

part1.txtpart2.txtpart2_new.txt
TABLE User_Query id parent sequence { "7872" ,"0" ,"100" } { "7966" ,"7872" ,"200" } { "7967" ,"7872" ,"300" } { "7800" ,"7872" ,"400" } { "7801" ,"7872" ,"500" } { "7802" ,"7872" ,"600" } { "7803" ,"7872" ,"800" } { "7804" ,"7872" ,"800" } { "8051" ,"7872" ,"900" } { "8052" ,"7872" ,"1000" } { "7805" ,"7872" ,"1100" } { "7806" ,"7872" ,"1200" } { "7807" ,"7872" ,"1300" } { "7808" ,"7872" ,"1400" } { "7809" ,"7872" ,"1500" } { "7810" ,"7872" ,"1600" } { "7811" ,"7872" ,"1700" } { "7812" ,"7872" ,"1800" } { "7813" ,"7872" ,"1900" } { "7968" ,"0" ,"2000" } { "7969" ,"7968" ,"2100" } { "42000" ,"7969" ,"2150" } { "7970" ,"7969" ,"2200" } { "7971" ,"7969" ,"2300" } { "7972" ,"7969" ,"2400" } { "7973" ,"7968" ,"2500" }
TABLE User_Query id parent sequence { "400365" ,"0" ,"100" } { "400366" ,"7872" ,"200" } { "400367" ,"7872" ,"300" } { "400368" ,"7872" ,"400" } { "400369" ,"7872" ,"500" } { "400370" ,"7872" ,"600" } { "400371" ,"7872" ,"800" } { "400372" ,"7872" ,"800" } { "400373" ,"7872" ,"900" } { "400374" ,"7872" ,"1000" } { "400375" ,"7872" ,"1100" } { "400376" ,"7872" ,"1200" } { "400377" ,"7872" ,"1300" } { "400378" ,"7872" ,"1400" } { "400379" ,"7872" ,"1500" } { "400380" ,"7872" ,"1600" } { "400381" ,"7872" ,"1700" } { "400382" ,"7872" ,"1800" } { "400383" ,"7872" ,"1900" } { "400384" ,"0" ,"2000" } { "400385" ,"7968" ,"2100" } { "400386" ,"7969" ,"2150" } { "400387" ,"7969" ,"2200" } { "400388" ,"7969" ,"2300" } { "400389" ,"7969" ,"2400" } { "400390" ,"7968" ,"2500" }
TABLE User_Query id parent sequence { "400365" ,"0" ,"100" } { "400366" ," 400365" ,"200" } { "400367" ," 400365" ,"300" } { "400368" ," 400365" ,"400" } { "400369" ," 400365" ,"500" } { "400370" ," 400365" ,"600" } { "400371" ," 400365" ,"800" } { "400372" ," 400365" ,"800" } { "400373" ," 400365" ,"900" } { "400374" ," 400365" ,"1000" } { "400375" ," 400365" ,"1100" } { "400376" ," 400365" ,"1200" } { "400377" ," 400365" ,"1300" } { "400378" ," 400365" ,"1400" } { "400379" ," 400365" ,"1500" } { "400380" ," 400365" ,"1600" } { "400381" ," 400365" ,"1700" } { "400382" ," 400365" ,"1800" } { "400383" ," 400365" ,"1900" } { "400384" ,"0" ,"2000" } { "400385" ," 400384" ,"2100" } { "400386" ," 400385" ,"2150" } { "400387" ," 400385" ,"2200" } { "400388" ," 400385" ,"2300" } { "400389" ," 400385" ,"2400" } { "400390" ," 400384" ,"2500" }

Step 8. Load part2_new.txt

Load the new part2_new.txt file back to update the relevant rows for the new access type.

pdm_load -f part2_new.txt -v

Retrieved from "http://www.servicedeskusers.com/Copying_an_Access_Type_Scoreboard"

This page was last modified 12:05, 7 November 2008.  This page has been accessed 4,316 times.  Content is available under Attribution-Noncommercial-Share Alike 3.0 UnportedDisclaimers

List Tickets ORDER BY Group

 

From SDU

Jump to: navigation, search

 

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.


 

Overview

This article will help you sort your Incident, Change Order and Request List in Scoreboard.

Procedures

Step 1 : Create the script

A script is created as an .mod file and placed in the NX_ROOT/site/mods/majic directory. When the Service Desk service starts, the contents of the majic directory are processed and cached. You can use any naming scheme you like for your .spl file, but it is recommended that the file be preceded with a 'z' for easy identification as a custom file (eg zMyCompany.spl, zcr_scripts.spl, zMyScripts.spl).

Below is the mod file for Change Orders - I have named it to be zchgsort.mod MODIFY FACTORY chg { STANDARD_LISTS {

 SORT_BY "group.last_name, chg_ref_num, status, open_date, priority"; 

}; };

Below is the mod file for Incidents - I have named it to be zinsort.mod MODIFY FACTORY cr { STANDARD_LISTS {

 SORT_BY "group.last_name, ref_num, status, open_date, priority"; 

}; };

Step 2 : Edit the list_chg.htmpl file for Change Order and list_cr.htmpl for Incidents

1) Search for the following text in your list_chg.htmpl file

<pdm_macro name=lsStart> <pdm_macro name=lsWrite text="pdm_if \"@{list.sla_violation:0}\" != '0'">

2) Just above the <pdm_macro name=lsStart> define the following var ref_num_style;

3) Now, Edit the pdm_macro column for Group to the following <pdm_macro name=lsCol hdr="Group" attr=group link=yes>

Below is the customization to the list_cr.htmpl file

1) Search for the following in your list_cr.htmpl file <PDM_MACRO NAME=lsStart>

2) Just above the <pdm_macro name=lsStart> define the following var ref_num_style;

3) Now, Edit the pdm_macro column for Group to the following <PDM_MACRO NAME=lsCol hdr=Group/Parent attr=group link=yes>

Step 3: Save Files and perform the following

1) Run the pdm_webcache from the command prompt 2) Stop and Start the Unicenter Service Desk Services. 3) Look at your Analyst Login and expand the "All" scoreboard value under Incidents and Change Order to see if your tickets are sorted as per the Group 4) Note : You first need to add the column "Group" if you did not have it earlier.

Retrieved from "http://www.servicedeskusers.com/List_Tickets_ORDER_BY_Group"

 

This page was last modified 13:34, 25 October 2011.  This page has been accessed 2,817 times.  Content is available under Attribution-Noncommercial-Share Alike 3.0 UnportedDisclaimers

Resolved: Create new chgnr lrel via Webservice

 

post Nov 9 2008, 02:29 AM

Post #2




found the solution...:
the line of code should be....:

 

 

 

string s_chg_id[] = {"chg:id_here"};
string s_asset = "nr:asset_id_here";
int sid;

 

myWS.createLrelRelationships(sid, asset , "chgnr", s_chg_id);

 

 

 

and it works like charm....
have fun

Um pequeno código de teste para logar na solução CA SDM e fechar um ticket utilizando o webservice do CA Service Desk Manager

 

URL padrao para o WS CA SDM http://localhost:8080/axis/services/USD_R11_WebService?WSDL

 

Module CASDM

 

 

    Dim USD As New localhost.USD_WebService

    Dim strSessionID As String = ""

 

 

    Function Login(user As String, password As String, url As String) As String

 

 

        Dim strReturn As String = ""

        Try

            url = IIf(Len(url) > 0, url, "http://localhost:8080/axis/services/USD_R11_WebService?WSDL")

            USD.Url = url

            strSessionID = USD.login(user, password)

            strReturn = strSessionID

        Catch ex As Exception

            strReturn = ex.Message

        End Try

 

 

        Return strReturn

    End Function

 

 

   

    Function CloseTicket(persid As String) As String

        Dim strReturn As String = ""

 

 

        If strSessionID.Length = 0 Then

            strReturn = "requires login"

        Else

 

 

            Dim ticket_handle As String = persid

            Try

                strReturn = USD.closeTicket(strSessionID, "ticket fechado", ticket_handle)

            Catch ex As Exception

                strReturn = ex.Message

            End Try

        End If

 

 

        Return strReturn

    End Function

 

 

 

 

End Module

 

OBS: Este codigo pode nao obter boa performance em utilizacao em massa.

          CUIDADO: Toda persolizacao pode ocasionar falhas no CA SDM.