locked
Remove link to Change Request from Portal Source Code RRS feed

  • Question

  • Hi

    Does anyone know where to remove the "Change" link from the enduser portal ?

    Thanks

    jon

     

    Tuesday, March 22, 2011 11:51 AM

All replies

  • Hi,

    May you give us more details.

    On which "Change" link are you talking ?

    Johann

    Tuesday, March 22, 2011 12:54 PM
  • Hi Jon,

    what exactly do you mean by "remove change link". If the goal is to prevent endusers to create change requests through the radio selection on the page "createrequest.aspx"- the easiest way would be to remove the "NewChangeOrResource" action from the RequestTypes IList. To do so you would comment out the following lines in the file PortalRequest.cs (around line 238)

    RequestTypes.Add(new RequestType(){
    
     DisplayName = WebPartsResources.NewChangeOrResourceDisplayName,
    
     Type = RequestTypeEnum.NewChangeOrResource
    
    });
    
    
    
    
    
    

    With this lines commented out - the radio button group schould only show a single entry - which leads to the next question: Is this "list" necessary anymore?;) - if you include custom options this might be ok, otherwise you could just scan through the file "CreateRequest.cs" and remove the requestTypeRadionBtnList completely and set the fixed value directly in the code behind (or just hide it e.g. through css - would be a bit more lightweight and wouldn't require any or less code to be changed).

    Cheers

    Dennis

     


    • Edited by Dennis Battenfeld Tuesday, March 22, 2011 1:09 PM clarify
    • Proposed as answer by James Yeoh Wednesday, April 13, 2011 11:29 AM
    Tuesday, March 22, 2011 12:57 PM
  • Hi

     

    Thanks thats what I looking for,

     

    Jon

     

    Thursday, March 24, 2011 7:41 AM
  • If the goal is to prevent endusers to create change requests through the radio selection on the page "createrequest.aspx"- the easiest way would be to remove the "NewChangeOrResource" action from the RequestTypes IList. To do so you would comment out the following lines in the file PortalRequest.cs (around line 238)

    Hi,

    Can you please guide me where and how to comment out the lines in PortalRequest.cs file?

    Ethan

    Saturday, March 26, 2011 9:16 AM
  • Hi,

    1. Open the file PortalRequest.cs, with MS Visual Studio.
    2. Comment out the lines like below:
    3.  /* RequestTypes.Add(new RequestType()
       {
          DisplayName = WebPartsResources.NewChangeOrResourceDisplayName,
          Type = RequestTypeEnum.NewChangeOrResource
       });*/
    4. Rebuild the Solution
    5. Move the dll and pdb concerned under BIN folder

    Regards.

    Johann

     

    • Proposed as answer by James Yeoh Wednesday, April 13, 2011 11:29 AM
    Monday, March 28, 2011 6:04 AM
  • Hello,

    Where is this PortalRequest.cs file? I've searched through the server and couldn't find it.

     

    James

    Thursday, March 31, 2011 3:29 AM
  • Hi,

    Did you install that ?

    http://blogs.technet.com/b/servicemanager/archive/2011/03/02/service-manager-portal-source-code-released.aspx

    "..\New portal\PortalSource-New\WebParts\Request\PortalRequest.cs"

    Johann

    Thursday, March 31, 2011 5:47 AM
  • Hello! I have opened the PortalRequest.cs file using MS Visual Basic 2008 Express application, made changes to it and now cannot find the way how to "Rebuild the Solution" for getting dll and pdb files". Could you help me, please.



    Monday, April 4, 2011 12:45 PM
  • you must open entir solution (.sln file)
    http://opsmgr.ru
    Monday, April 4, 2011 10:23 PM
  • Hello,

     

    I've done all the steps mentioned above as well as in the guide that came with the source code. I've rebuilt the solution with 0 errors, and I have the 4 new .dll files and 2 new .pdb files with me now, to where do I actually copy these files to?

     

    James

    Wednesday, April 6, 2011 9:05 AM
  • Hello,

    Where can i find this files? i have searche in several folder but i can't find it. can someone explain it in details.

    Thanks for all.

     

     

    Friday, April 8, 2011 9:13 AM
  • Mike, have you downloaded the source code that Hugues posted at the above post? The files are there.

    Guys, After building the solution, what do I do with the modified files? Do I need to create a class, form and workflow as stated in the doc at step 7? The doc is not as clear, any guidance please?

     

    James

    Monday, April 11, 2011 4:09 AM
  • Hi James,

    Everything needed is written in the documentation provided with the code, even if there are 2 or 3 mistakes.

    Read the chapter 6 and compare your files with the "code" files after the rebuild, and move all modified files.

    Johann

     

    Monday, April 11, 2011 6:13 AM
  • Hi Hugues,

    Think I made things more complicated that it should be. I just needed to copy the changed files to inetpub folder... Problem solved, thanks :)

     

    James

    Monday, April 11, 2011 6:40 AM
  • sorry, but now i have downloaded the source code. and started. But i have still some problems. Maybe i do something wrong.

    I have changed the portalrequest.cs file and, removed the missing reference and add the reference again. (what i have copied from my scsm webserver to the common folder in portal source code on my local pc with visual studio 201) after that i have (re)build the solutions with ouput (see under my explantion)

    Then i have moved the dll and pdb files to the name location in the scsm webserver and restarted the service. now i get the error, run time error. if i replace them with the orginal files everything is working fine)

    Can please someone explain what I am do wrong. (or make documents with steps and picture's)

    Thanks for all :):

    ------ Build started: Project: Common, Configuration: Debug Any CPU ------

    Common -> \\nlamsfil02\home$\EM1002\Desktop\PortalSource-Original\PortalSource-ForDistribution\Common\bin\Debug\Microsoft.EnterpriseManagement.ServiceManager.Portal.Common.dll

    ------ Build started: Project: AnalystWebParts, Configuration: Debug Any CPU ------

    AnalystWebParts -> \\nlamsfil02\home$\EM1002\Desktop\PortalSource-Original\PortalSource-ForDistribution\AnalystWebparts\bin\Debug\Microsoft.EnterpriseManagement.ServiceManager.AnalystWebParts.dll

    ------ Build started: Project: WebParts, Configuration: Debug Any CPU ------

    WebParts -> \\nlamsfil02\home$\EM1002\Desktop\PortalSource-Original\PortalSource-ForDistribution\WebParts\bin\Debug\Microsoft.EnterpriseManagement.ServiceManager.WebParts.dll

    ------ Build started: Project: \\nlamsfil02\home$\...\AnalystWeb\, Configuration: Debug Any CPU ------

    Validating Web Site

    Building directory '/AnalystWeb/'.

    Validation Complete

    ------ Build started: Project: End user portal, Configuration: Debug Any CPU ------

    End user portal -> \\nlamsfil02\home$\EM1002\Desktop\PortalSource-Original\PortalSource-ForDistribution\End User Portal\bin\Microsoft.EnterpriseManagement.ServiceManager.Portal.dll

    ========== Build: 5 succeeded or up-to-date, 0 failed, 0 skipped ==========

    Monday, April 11, 2011 1:16 PM
  • Just taking a wild guess... Are you running on SP1?
    Monday, April 11, 2011 4:51 PM
  • Hi,

    I've just repeated the whole step from scratch and made a step by step guide. Hope this helps anyone who's going to need this.

    http://memoexp.wordpress.com/2011/04/12/remove-change-request-link-from-scsm-portal/

     

    James

    Tuesday, April 12, 2011 6:36 AM
  • James,

    Great, Now its working. I was using the orginal zip file. Many thanks :)

    Now i am starting with removing some extra buttons, such as request password reset.


    • Edited by Mike Bergshoeff Wednesday, April 13, 2011 9:00 AM miss spelling
    Wednesday, April 13, 2011 8:58 AM
  • You're welcome, glad it helps :)
    Thursday, April 14, 2011 3:37 AM