Is there a way to put a link to the Change Calendar on the employee interface screen, or even on an external portal? We allow any employee to view any change order, and would like to be able to allow employees to see the scheduled changes via the calendar.
Hi, the link to change calendar:
I think you also will need to copy list_chgsched.htmpl to employees form group. Also you should be able to add Change calendar tab for them.
I've replaced hostname with one of my secondary servers, but I'm getting this error: AHD04400:Argument error
It may be a little bit different link for sd12.7 anyway you can check link under Administration->security and role management->role management->tabs Open Change_Calendar_tab and click there on the starting page, you will se the link there. In my case (14.1) there is:
what is yours?
Mine has this:
Then it should work, have no clue why it is not working. Try one of these
If you have IIS
I do have IIS -- but none of these worked either....
It also work on SD129, you may also try the following link
Ahh, your link above worked when in the analyst role. But I'm getting this error when I'm in the 'employee' role:
AHD04407:CA Service Desk Manager html generation error. Could not find or process 'list_chgsched.htmpl'.
AHD04714:Unable to open file list_chgsched.htmpl at ?: No such file or directory (2) userid=TZ26297
You said previously that I would need to copy list_chgsched.htmpl to employees form group. I just put that file in the employee folder here:(\site\mods\www\htmpl\web\employee), and did a pdm_webcache, but I'm still getting the error.
You will also need to copy list_chgsched_config.htmpl file, because it is included in list_chgsched.htmp. Also check that you copied files to the right server
So basically you need to do few things:
1. copy 'list_chgsched.htmpl' and list_chgsched_config.htmpl
2. copy setupSchedule(ApplComponent) functionfrom schedule.js to sitemod.js
3. Modify setupSchedule(ApplComponent) function to exclude the following line when function called from employee interface:
for this you can add additional parameter or do something else.
Then after entering the link http://hostname:8080/CAisd/pdmweb.exe?OP=SEARCH_RETURN_ALL+FACTORY=chg+HTMPL=list_chgsched.htmpl+QBE.EQ.active=1
You should get something like this:
I've done #1, and will try to do the others soon and get back to you. We've decided that we want to put this link on another portal of ours, and not on the employee interface. But I'll probably still need to do #3, since it's being displayed in the employee interface, right?
I'm also going to want to remove (hide) the 'Create New' button from the employee view....
Thanks again for all the help!
You are welcome. To hide the 'Create New' button in 'list_chgsched.htmpl' change the following line:
<PDM_MACRO name=sfStart create=true export=no factory=chg>
<PDM_MACRO name=sfStart create=false export=no factory=chg>
I'm definitely not a code expert, so I could use some help with #2 above.
I'm not finding a sitemod.js file. Am I supposed to create that file and put it in the site/mods directory, and the contents of that file should only be the 'setupSchedule(ApplComponent) function' part from the schedule.js file?
And can you tell me the exact lines to copy from schedule.js file into the sitemod.js file? I see the 'setupSchedule(applComponent) function, but I'm not sure where exactly it starts and where it ends.
Ok I think the easiest way will be to copy setupSchedule(ApplComponent) to 'list_chgsched.htmpl', I this case you will have original script for analysts and custom for employees. To do that I would suggest you to use notepad++.
1. Open 'list_chgsched.htmpl' in notepad++ and search for function setupSchedule(ApplComponent)
2. Once you find your function you will see minus sign on the left of it (marked in yelow)
3. Click on minus sign this will collapse function, copy lines marked in my next picture
4. Paste copied content in your custom 'list_chgsched.htmpl' file before </script> tag
5. Rename copied function to setupScheduleemp(ApplComponent) and delete the following line: window.menubarFrame.ImgBtnChangeCaption("btnbackToList","Back_to_calendar");
6. find the following line in list_chgsched.htmpl:
<body class="list" onload="setupSchedule('change')">
change it to
<body class="list" onload="setupScheduleemp('change')">
7. Find the following line:
8. Perform pdm_webcache, and clear the browser cashe (you can also use browsers private mode to ensure that you are not working with cached content)
Great instructions, thanks. Just one more question, and I think I'll have it.. My Notepad ++ doesn't have the plusses/minuses to collapse or expand the sections. Is that a view I need to turn on, or a plug-in that I need to add?
Sent from my iPhone
Ok, I think I've got it! I copied the function from the schedule.js file --- pasted it into the list_chgsched.htmpl file, before this: </script>
And my URL seems to be working great now! Thank you so much...
Well, I guess I spoke a little too soon. The calendar is loading on the page, but it doesn't seem to be functioning quite right.
1) It says it's showing me the month of April --- but my test CO that is scheduled for April 25 is not showing. When I click on show filter, the schedule start and end dates are empty. (These get automatically populated with the current month's date ranges when you initially view the calendar as an analyst). So it's showing you the calendar for April, but not any of the scheduled COs.
Is it doing that because the below line was changed to false?
And when I navigate to another month (February 2016, for example), it then puts the current date ranges into the schedule start and end dates and shows me the month of April with the scheduled CO.
2) When I click on a CO to view it, I get the below message (I don't get this when using the Analyst role)
3) After clicking OK to the above prompt, I see the CO in the list view. When I click on it, the CO opens fine with the 'employee' view of the CO. But there isn't a 'Close Window' button at the top right.
Any help you can give for these last remaining tweaks is appreciated!
Which link do you use to open calendar
Ok thats the problem for your first issue. This link was just for testing purposes. Please use the following link
That URL works much better!
So I can live with the other things shown below, if they can't be fixed ---
Regarding your second issue. There is a script in schedule.js called:
function buildNdayCalendar( days, startDate, evtFilter )
You can copy it to 'list_chgsched.htmpl' file before </script> tag
Then you need to remove the following line on the beginning of the script:
cleanup server and browser cache.
Test carefully all functionalities of calendar including maintenance windows and etc.
There is no close windows link because there is no such control in change employee form. There will be no close window link even if you open the change from employee home screen.
Yeah, I did figure that out later... Thanks.
Thanks, I think I'll just leave that prompt there for now. It doesn't seem to hurt anything. But I will save your instructions in case I want to remove it later, thanks!
You are welcome
Another question about the employee role being able to view the change calendar.....
Can you tell me how to hide the 'Reopen Change' button from the employee view of a closed CO? When an employee is viewing the change calendar, they can click on 'show filter' and change the filter to see closed COs, and when they view it that button is visible. We removed the ability to look up closed COs from the employee interface, so that button never needed to be removed before. That button isn't visible when looking up closed incidents and requests from the employee interface, so I was looking at the reopen function on those forms compared to the 'employee' detail_chg.htmpl form, but I'm not seeing any differences -- So it doesn't look like it is being hidden at the form level.
You can simply comment or remove the following line in detail_chg.htmpl
<PDM_MACRO name=button caption="Reopen Change" func=reopen_change() hotkey_name="Reopen Change" id=btn003>
Great, I'll try that. Thank you!
Well, I commented out that line in the employee 'detail_chg.htmpl' form:
// <PDM_MACRO name=button Caption="Reopen Change" Func=reopen_change() hotkey_name="Reopen Change" ID=btn003>
I saved and published the change, did a pdm_webcache, but the button is still showing when opening the change order from the change calendar. Is there maybe a different form that it's using when viewing from the calendar?
Strange it Works for me.
1. Please check that you did modification to the detail_chg.htmpl form that is in site/mods and you did it for the right form group (by default %SDMROOT%\site\mods\www\htmpl\web\employee)
2. Instead of using // try to comment using
<PDM_MACRO name=button Caption="Reopen Change" Func=reopen_change() hotkey_name="Reopen Change" ID=btn003>
3. Eensure that you did pdm_webcache
Yes, I've confirmed that I modified the right one. And I've done the pdm_webcache again, and still see the button.
But when I changed how I have it commented out to the below, that did the trick!
Thank you for your diligent guidance here towards the solution Gutis.
It is very much appreciated !
Yes, Raghu... It is definitely appreciated!
You said this: Open 'list_chgsched.htmpl' in notepad++ and search for function setupSchedule(ApplComponent)
But I'm not finding that code in the list_chgsched.htmpl file -- it's in the schedule.js file -- did you mean to say copy it from there, into the custom 'list_chgsched.htmpl' file?
It is fantastic when community members help each other!
Keep up the fantastic work everyone!