Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 12/29/2015 in all areas

  1. 3 points
    The following is a list of terms used in descussing different aspects of CA Service Desk Manager. Term Description $NX_ROOT refers to the installation directory of Service Desk
  2. 2 points
    We're back! And there have been some changes! What did NOT change? SDU is using the same forum software All forum content is intact All wiki content is (or soon will be) available under the Articles section The Articles section will be editable by users, like the wiki was Everyone's accounts, passwords, and content are all intact What DID change? The wiki interface is gone The forum software has been upgraded (7 years overdue!) Reputation system - you can "like" posts and other content Social Media - you can share content to many different social media sites The original layout/look of the site has been replaced with a standard template, in an effort to bring the site back online quickly Advertising - for the moment, the advertising has been removed New host - the site is now hosted by the makers of the forum software. This is more expensive, but should result in easier maintenance and timely software upgrades. What caused SDU to shut down in the first place? Okay, so a few weeks ago, the previous company hosting SDU suspended the account because someone found a way into my account and either both malware files throughout the file system as well as attach malware code to existing, legitimate files. We're talking over a thousand affected files in a sea of over 15,000 files. At first, it looked like a manageable set to review one at a time and fix/delete. However, I soon realized just how pervasive the damage was and realized it was not reasonable to fix everything. And the host would not reactivate the account until the malware had been removed. On top of that, my host account was about to renew for another 2 years' of service. I saw no easy way to get SDU back up and operational, so I decided to pull the plug. I did NOT want to do that, and hated to see all of that content just disappear. So, why is SDU back in business? Well, mainly because of you. In the weeks since shutting down SDU, I've received quite a few emails from you guys thanking us for hosting SDU, offering stories of how SDU has helped you in the past, and many, many offers to help bring the site back or at least make a copy of the content available. I decided to break out the defibrillator and see if I couldn't get find a way to revive SDU. This is the result! I hope you like it! Gregg
  3. 2 points
    it's a Christmas miracle! Many thanks!
  4. 2 points
    Overview CA does not provide a GUI supported method for creating or modifying Condition Macros or Action Macros. However, the function that these types of Macros provides can be crucial. This article explains the steps to take for creating new or editing existing. Keep in mind, CA does not support any changes to the default Action Macros or Condition Macros and will not support any that you create. It is also highly recommended that you never modify the defaults, but rather copy them and create your own custom ones. Procedures Step 1. Extract a Sample Macro The first step is to extract a macro from the system and use this as guide. Take note of the macro's name the enter the following command: pdm_extract -f "SELECT del,fragment,lock_object,ob_type,sym,type FROM Spell_Macro WHERE sym = 'sample macro name'" > yourfile.txt Step 2. Add Your Script Now that you have the sample macro extracted from the system, modify the contents of the 'fragment' column to suit your scripting needs. Remember to use \\0012 for your carriage returns and \ to cancel out the double quotes in your script. Also, be sure to change the value of the 'sym' column or your new macro will not be loaded. Step 3. Load New Macro Run the following command to load your new macro into the system: pdm_load -f yourfile.txt -i -v Step 4. Extract New Macro for Additional Changes Run the following command to extract your new macro if additional changes are required: pdm_extract -f "SELECT * FROM Spell_Macro WHERE sym = 'sample macro name'" > yournewfile.txt Step 5. Uploading Changes Run the following command to load your modified macro into the system: pdm_load -f yournewfile.txt -v Notice there is no -i this time. A -i is only used when "inserting" a new macro, not when editing an existing one.
  5. 1 point
    Hi, you can't fetch data in survey this way, because survey isn't linket to ticket, try to use PDM_LIST macro to get tickets data: code will look like: <PDM_LIST prefix="list" factory="cr" where="persistent_id = '$ext_args.CNTXT_PERSID'"> var cr_ref_num = "$list.ref_num"; var cr_assignee = "$list.assignee.combo_name"; // etc... </PDM_LIST> alert(cr_ref_num); alert(cr_assignee);
  6. 1 point
    hi forum i am trying to write a spell code to display a message when the user tries to save a change order without attachment. (for CA Service Desk 12.6) there is a solution in this forum for a previous version. http://www.servicedeskusers.com/forum/inde...ired+attachment i change a little in the code my mod file: MODIFY chg PRE_VALIDATE zchg_verify_attach() 123 FILTER(EVENT("INSERT")); my spl file: chg::zchg_verify_attach(...){ string zmsg; int zattmnt_length; send_wait( 0, this, "get_attr_vals",1,"attachments.length"); if (msg_error()) { logf(ERROR, "error getting attachments.length for %s", chg_ref_num); return; } zattmnt_length = msg[3]; logf(SIGNIFICANT, "attachments length is %d",zattmnt_length); if (zattmnt_length == 0) { zmsg = "You must provide an Attachment to save change order"; set_error(1); set_return_data(zmsg); } } however this code and the original don't seem to work for version 12.6, and the message is displayed with or without attachment. I checked the log file for: logf(SIGNIFICANT, "attachments length is %d",zattmnt_length); and the attachment length is always 0 even when i attach. Is there a way to make attachment required using triggers and spell in 12.6 or should i use javascript????
  7. 1 point
    I'll try to explain (there is a chance that I didn't catch your goal due to my low english ). You've got 1 checkbox and 1 text field, checkbox switches ReadOnly mode and Requriement state for that text field, right? Firstly you need to add trigger to your checkbox to perform actions while it checked (or checked out): Also you have your textbox, don't make it required or user cant switch it requirement state on-the-go: You need to define JavaScript function to perform actions on checkbox change, locate it somewhere in header between <head></head> tags (and between <script></script> tags sure ). function zReadOnly(RO_STATE) { // try to switch only on form edit if (_dtl.edit) { var switcher = true; if (RO_STATE) { switcher = false; } else { ahdframe.document.getElementsByName('SET.zwork_descr')[0].value = ""; // this wipes field on uncheck } ahdframe.document.getElementsByName('SET.zwork_descr')[0].readOnly = switcher; // this makes field editable (or not) ahdframe.detailMakeReq("zwork_descr", switcher); // this makes field required } } Then, once you check your checkbox, description field become editable and required. Everything looks fine but when you open your form for edit, it checkbox already checked you need to switch it 2 time, to make it work correctly, then you need to add 1 more action on page loads: find your <body> tag and add javascript function to onload area: If something went wrong, you can check browser's console (F12) for detailed error message. I have checked code beyond in my test env and it works fine. Regards, cdtj
  8. 1 point
    if you need to dinamically switch your editable state, you can: 1. add onchange event to your checkbox: 2. function will look like: 3. dont forget to perform switch on form load: Regards, cdtj
  9. 1 point
    hi, you can create trigger on lrel_attachments_requests table, set filter to trigger only on insertion and if conditions like repository are met, attach event with Multiple Notification macro. regards, cdtj
  10. 1 point
    Great Gregg and your team !.. Really SDU helps a lot for me and most of the people who are beginners to CA Service Desk. Have a wonderful year ahead and all the best..
  11. 1 point
    It's great to have SDU back ! Thank you Gregg ! Hope you have a wonderful year ahead !
  12. 1 point
    Welcome Back! ! ! Great to see, and here's to another long run. There was certainly goodwill over at CA Communities when users heard about this: https://communities.ca.com/community/ca-service-management/blog/2015/12/09/the-end-of-an-era-farewell-and-thank-you-servicedeskuserscom I'm always happy to point people here as a great resource. Kyle_R.
  13. 1 point
    Well done sir. Many thanks for all your efforts.
  14. 1 point
    Overview Starting with the r11.x releases, events and macros are managed in the web client. Prior to r11, they were managed in the java client. Events Events are the combination of a condition and one or more actions. They are attached with tickets via Service Types, Service Contracts, or custom code. If an event is attached to a ticket, it will trigger after a defined period of time. When an event is triggered, it's condition is evaluated and will return either True or False. Any actions associated with the condition evaluating to True or False are then executed. Macros The conditions and actions that are used in defining Events are done using macros. While condition macros evaluate to either True or False, action macros allow for just about any action possible within Service Desk. Below are explanations and examples of the two types of condition macros (Condition Macros and Site-Defined Condition Macros) and 4 types of action macros (Action Macros, Attach Event Macros, Multiple Notification Macros, Remote Reference Macro). Site-Defined Condition Macro Site-Defined Condition Macros are a special kind of condition macro. There are no site-defined condition macros included in a fresh install of Service Desk. They are created by the client. While the Site-Defined Condition Macros provide an easy to use interface and offer vast flexibility, they do not offer as much flexibility as Condition Macros. Condition Macro When a site-defined macro won't do the job, it is time to use Condition Macros. A fresh install of Service Desk contains quite a few to start with. There are no default capabilities for managing Condition Macros within the administration interface. Since they are written in Spell code and Spell code is not officially supported by CA, take special caution when working with them. To add new Condition Macros, see How To Manage Spell-Based Macros. It is highly recommended that you do not modify ANY of the default Condition Macros. If changes are needed, create a new one based on the original. It is best to reference existing Condition Macros to understand the coding that is needed. Action Macro Action Macros are typically used to set field values, such as increasing Priority or setting the SLA violation. However, since they are written in Spell code, they can perform just about any action possible within Service Desk. A fresh install of Service Desk contains quite a few to start with. There are no default capabilities for managing Action Macros. To add new Action Macros, see How To Manage Spell-Based Macros. It is highly recommended that you do not modify ANY of the default Action Macros. If changes are needed, create a new one based on the original. It is best to reference existing Action Macros to understand the coding that is needed. Attach Event Macro Attach Event Macros are used to attach another event. This allows for complex branching in your conditioning as well as on going processing. Multiple Notification Macro Multiple Notification Macros are the most commonly used type of macros. They are used to send out notifications. Unlike Activity Notifications, Events combined with Multiple Notification Macros add more flexibility with notification. However, by default, Multiple Notification Macros do not provide HTML email support. Remote Reference Macro Examples Condition Macros Site-Defined Condition Macros Action Macros Add Custom Activity Log Attach Event Macros Multiple Notification Macros Remote Reference Macros
  15. 1 point
    Hi All, Realy T5U3369 solved this problem. Open a case on Support
  16. 1 point
    Hi Dear, You can find it in bopcfg\majic folder. File name is tmplcopy_site.spl. Copy it to site majic folder and then you can edit the file to restrict your attribute to be copied. For example if you want to restrict chg attribute. There is a function in the file called copy_chg_site(...). If you want to make assignee field blank. Just put new.assignee = ""; Regards, Vikash
  17. 1 point
    The integration is configured thru a Configuration Policy on CA ITCM, all atributes has a short description that will help you on configure it. But if you are talking about use the discovered hardware by ITCM on CA SDM i suggest you to check the command "pdm_discimp" on SDM server, i'm not sure if pdm_discimp is the best option but.....
  18. 1 point
    Here is a sample code: if (argID != 0) <PDM_MACRO name=button caption="Event History" func="show_evt('cnt', 'atev', argID)" hotkey_name="Event History" id="SHOW_EVT_HISTORY" width=0> <PDM_MACRO name=btnEndRow> </PDM_IF> <PDM_MACRO name=dtlStart scroll=true> // Custom BEGIN: add contact image <PDM_IF "$args.type.id" != "2308"> </script> <table width="90%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="150" align="center" > <img src="$CAisd/sitemods/img/imgFolder/generic.png" witdh="128" height="128" id="person_img" name="person_img" onerror="this.src='$CAisd/sitemods/img/marca/person.png';" /> <PDM_IF "$args.z_employee_id" != ""> <script type="text/javascript"> var zPhotoURL = "$args.z_employee_id"; var imgUrl = "$CAisd/sitemods/img/imgFolder/" + zPhotoURL + ".jpg"; document.getElementById('person_img').src = imgUrl; </script> </PDM_IF> </td> <td align="right" style="padding-right: 5px;"> <script type="text/javascript"> </PDM_IF> // CUSTOM END Some comments: * this is part of detail_cnt.htmpl, the CUSTOM BEGIN/END show the custom code, you'll find the position to add this code by the previous code section (look up for 'Event History' button and find the portion in the page). * it assumes there is a custom attribute (z_employee_id) that exists on the 'cnt' object and each photo of an employee exists in the $NX_ROOT/site/mods/www/wwwroot/images/imgFolder folder. If you can identify an user by other attribute (such as userid) then you can replace z_employee_id with this attribute in the code above. * the code checks if the user accessing the page is an Analyst, so the info is displayed only for them.
  19. 1 point
    Hi Jim_Project, Try the following syntax: id = U'7CE0E3139A37EC4C9AC8F4439C2BA1EE' P.S. 7CE0E3139A37EC4C9AC8F4439C2BA1EE is the id (contact_uuid) of the Group record
  20. 1 point
    If you look at the list of Workflow Task Status Codes you will see that (Out-of-the-box) the Reject status has "Yes" for Task Completed. 1. You can set that to "No" if you want Reject to mean "I will not approve this now but if you fix up some things I will later approve it". 2. Leave it at "Yes" if you want reject to mean "This will not go forward. You can cancel this Change Order and submit another without the indicated deficiencies (try File...Copy...)." One issue that arises out of point 1 is that if there are multiple approval tasks (e.g. a Technical and a Management approval). Are you assuming that if the second approval is withheld until alterations are made that the first approval is still valid even though the first approver has not seen the changes?
  21. 1 point
    I can see 2 ways of writing to your own table(s): 1) use HTMPL forms and java script: on your detail_alg.htmpl, add some logic that checks for a 'TR' type of activity, then somehow have another the detail_z_custom_table.htmpl file load in a hidden frame with the CREATE_NEW operand. You will need to find a way to submit that hidden frame as well. Disadvantages: - this logic will only work if the TR is done from the detail_alg form. Not if it's done by some web service, or automated event / other possibilites. - logic runs mainly on client side, so out of control (javascript must be enabled, ...) - that last part: 'submit the hidden frame' could be a tricky thing (you need to make sure it's been loaded, has all values populated, only then submit) TIP: in r12.5 I believe you can create your own server operations (like CREATE_NEW), so there could be an easier/more direct way to do it! Sadly enough, your new operations need to be coded in Spell code :s 2) change the behavior of Service Desk by Majic/Spell code: this is achieved by setting up a server side trigger (not a DB trigger) in a mod file. This trigger would specify that whenever a TR activity is being saved some other code needs to run as well. That other code is a Spell function that you put in a spl file. Disadvantages: - Spell code is unsupported by CA - Spell code is undocumented, so you're never sure it will not do anything else than what you assume it's doing If you don't have any experience with Spell coding, this might indeed be tricky because it's already one of the more complex adaptations one could do. Basically, you'd need to retrieve all your values (agent doing the transfer, previous assignee, new assignee, ...), then initiate a group leader, create a new object of your z_custom_table type, set its values, then check in everything. That's why I referenced to that Wiki, it has all this in it (I only put the major parts in here to keep it simple): alg::z_write_to_new_table(...) { uuid uuidOldAssignee; uuid uuidNewAssignee; uuid uuidAgent; // set your values... (not sure what we all have in alg, need to check if we can find out the old and new values of the assignee and how) uuidOldAssignee = ...; uuidNewAssignee = ...; uuidAgent = ...; send_wait(0, top_object(), "get_co_group"); if (msg_error()) { logf (ERROR, "Error %s: could not get group leader", msg[0]); return; } object group_leader; group_leader = msg[0]; send_wait(0, group_leader, "checkout", dob); if (msg_error() && msg[0] != "NO") { logf(ERROR, "Error %s: checkout failed", msg[0]); return; } object custom_record; send_wait( 0, top_object(), "call_attr", "z_custom_table", "get_new_dob", NULL, NULL, group_leader); if (msg_error()) { logf (ERROR, "Error %s: could not get new z_custom_table", msg[0]); return; } custom_record= msg[0]; custom_record.oldassignee= uuidOldAssignee; custom_record.newassignee = uuidNewAssignee; custom_record.transferringagent = uuidAgent; send_wait(0, group_leader, "checkin"); if (msg_error()) { logf(ERROR, "Error %s: checkin failed", msg[0]); send_wait(0, group_leader, "uncheck"); return; } } Your trigger (on the ALG object) would look something like: POST_VALIDATE z_write_to_new_table() 1001 FILTER(EVENT("INSERT") && type = 'TR' ); I hope this helps, it's not 100% complete but should explain already most of what you'll need...
  22. 1 point
    Hi. pdm_load can be quite a helpfull tool, if you know how it works. Of course, pdm_load can do updates and inserts based on one file. But you have to know, how the data must look like. The question is, how can pdm_load determine, if it has to do an update or an insert for one single data record. If your loadfile includes the "id" column, it's quite simple: If a record for a given id is found, pdm_load will do an update to that record, if the id is not found in the db, pdm_load will insert a new record with the given id. Fine so far, but normaly in real world, you want to import/update data from external sources, and these sources do not know any internal ServiceDesk id values. Therefor, CA has invent the so called secondary keys. One or many columns within the ServiceDesk Schema for a single table can be marked as a secondary key (S_KEY). Take a look at the file site/ddict.sch. Here you will find all tables and columns known by ServiceDesk, and also, which columns do have the S_KEY attribute set. If no id column is given in your loadfile, all secondary key fields must be specified in the load file. When pdm_load works on such a file, the secodary key values will be used to search in the DB for existing records. From that point of view, it would make sense, that there is a unique index over all secondary key fields, because these fields will be used to uniquely identify a record. But this is a different story. If a record is found, this record will be updated, if no record is found, a new record with a new id will be created with the given data. For example. You want to load Request Areas. The ServiceDesk Table name is Prob_Category. A look into the ddict.sch file shows you, that the sym field is a secondary key. If your loadfile looks like TABLE Prob_Category sym description del { "sw.office.word", "This is a software problem with word", "0" } and you would do just a "pdm_load -f yourfile.dat", pdm_load would insert this record if it doesn't find an existing record with the sym field equals to "sw.office.word", otherwise it would do an update on the existing record. Hope that helps a bit. Regards ..........mikelm
  23. 1 point
    Well, I'm not an expert on this, but I see two things: Your function doesn't correctly calculate your local time: I assume the following: * In your environment the function DATEPART(dw, ...) will give back a 1 for Sunday, a 2 for monday, and so on * Your DST starts on the second sunday in March at 02:00 and ends at first Sunday in November at 02:00 If this is right, your function should look like CREATE FUNCTION [dbo].[GetDateFromEpoch] ( @Seconds int, @ConvertToLocalTime bit ) RETURNS datetime AS BEGIN DECLARE @datLocalDateTime datetime if(@ConvertToLocalTime = 0) BEGIN SET @datLocalDateTime = dateadd(s, @Seconds, '1/1/1970') END ELSE BEGIN DECLARE @datToCheck datetime SET @datToCheck = dateadd(s, @Seconds, '1/1/1970') DECLARE @intYear integer DECLARE @strMar1 varchar(18) DECLARE @strNov1 varchar(18) DECLARE @DayOfTheWeek integer DECLARE @DateDifference integer DECLARE @datDSTStarts datetime DECLARE @datDSTEnds datetime DECLARE @intGMTOffset integer /* Calculate when DST begins for the year in question */ SET @intYear = DATEPART(yyyy, @datToCheck); SET @strMar1 = CONVERT(varchar(18), @intYear) + '0301 02:00:00'; SET @DayOfTheWeek = DATEPART(dw, @strMar1); /* Day March 1 falls on in that year */ if(@DayOfTheWeek = 1) BEGIN SET @DateDifference = 7 /* Sunday is 1st day of the month */ END else BEGIN SET @DateDifference = 15 - @DayOfTheWeek; /* # of days between that day and the 2nd Sunday ("the second Sunday in March ", i.e. when DST begins)*/ END SET @datDSTStarts = DATEADD(dd, @DateDifference, @strMar1); /* Calculate when DST is over for the year in question */ SET @strNov1 = CONVERT(varchar(18), @intYear) + '1101 02:00:00'; SET @DayOfTheWeek = DATEPART(dw, @strNov1); /* Day Nov 1 falls on in that year */ if(@DayOfTheWeek = 1) BEGIN SET @DateDifference = 0 /* Sunday is 1st day of the month */ END else BEGIN SET @DateDifference = 8 - @DayOfTheWeek; /* # of days between that day and the 2nd Sunday ("the second Sunday in March ", i.e. when DST begins)*/ END SET @datDSTEnds = DATEADD(dd, @DateDifference, @strNov1); /* Determine if the date in question is in DST or not */ IF @datToCheck BETWEEN @datDSTStarts AND @datDSTEnds BEGIN SET @intGMTOffset = -4 /* DST */ END ELSE BEGIN SET @intGMTOffset = -5 /* No DST */ END SET @datLocalDateTime = DATEADD(hh, @intGMTOffset, @datToCheck) END RETURN @datLocalDateTime ENDNot that much changes, just the line "SET @DateDifference = 7 /* Sunday is 1st day of the month */". Otherwise, if the first march is a sunday in the year in question, your dst will begin already on the first sunday of march and not on the second one. Secondly, in your report, you are using this function with different parameters. For open_date, you are allways passing a 1 as the "ConvertToLocalTime" value, for resolve_date a 0. Why? If you pass a 0 to this function, no DST adjustment and no UTC adjustment (your timezone) will be done, never. This is the reason, your resolve date is wrongly calculated. My assumption is, that it is wrong all the time, because you allways pass a 0 as the ConvertToLocalTime parameter. And your calculated date difference is also wrong, because of the 0. Suggestion: From my point of view, you should allways pass a 1 in the ConvertToLocalTime parameter when calling your function GetDateFromEpoch. Hope that helps Regards ........mikelm
  24. 1 point
    Old post but in case anyone else ends up here...Since the editor for Knowledge articles is so horrible, I write them using a simple wysiwyg editor, save the HTML separately, and publish the article. Then if any edits need done later I will edit the HTML first and then unpublish, paste the changes in, re-publish really quickly. Downtime is usually less than a minute. It's really manual but I can't tolerate using that editor
  25. 1 point
    Create a button ImgBtnCreate("btnwel", "Welcome", "welcome()", true, 0); The function to execute The java function to execute at the click of the button is as follows: <script type="text/javascript"> function welcome() { var oShell = new ActiveXObject("Shell.Application"); var commandtoRun = "C:\\Windows\\system32\\cscript.exe"; oShell.ShellExecute(commandtoRun, "c:\\test.vbs", "", "open", "1"); } </script>
×