Self Service Delete Button

Does anyone know how to enable the Delete Button in Self Service. I tried doing DisplayButton(Button_Delete) = true; but that doesn't seem to work. I also tried creating my own delete button like this...

censusListBlock.AddButton(BuildButton("delete","delete.gif","javascript:x=location.href;i=x.search('&em=');if (i >= 0) { x=x.substr(0,i)+x.substr(i+2+3,x.length);}x=x+'&'+'em'+'='+'3';location.href=x"

));

But that doesn't work either. Anyone ever added a delete button to their self service site? Thanks.

  • 0

    In the code DisplayButton(Button_Delete), the Button_Delete is a variable that is not included in the default ewaress.js file. It represents an integer value, 0,1,2,3 etc. Pass the value for the Delete button and it will be added. I have discussed buttons in self service in the hints and tips blog.

  • 0

    Hi Phil,

    Yes, pretty much standard thing what you are trying to achieve I agree, however how I look at this is as follows.

    Mostly the self-service site is for clients to track the status of their cases, opportunities. They can log new cases in the system however as per the thumb rule nothing should be deleted from CRM system by client without our knowledge. That might be the primary reason why delete button must not have been there. There can be two ways to address this issue.

    1. We can change business flow. We can give page on portal for submitting deletion request. Once this request is received in the system, CRM user will review the same and delete the case from within CRM. This way we have control on what data is being deleted.

    2. If you want to achieve the same anyhow, the approach would be not to use standard Delete button. You can add custom action as follows.

    censusListBlock.AddButton(BuildButton("Delete","delete.gif","javascript:DeleteClicked();")

    You can define the DeleteClicked() method as follows.

    function DeleteClicked()

    {

    //Set some hidden variable

    //Submit the form

    }

    Once the page reloads write a code to update delete flag using record id.

    Hope this helps!

    Regards,

    Dinesh

  • 0

    Thanks Dinesh. I figured that's what I was going to have to do, but was making sure that I wasn't missing something really easy :-)

    Jeff,

    I had already tried using 0, 1, 2 and 3 and no luck. The only one that showed up was the Default button. BTW, where is this Hints and Tips blog that you keep referring to in your posts. Sorry I'm kinda new here. Thanks

  • 0

    Phil

    The Hints Tips and Tricks blog is here

    community.sagecrm.com/.../default.aspx

    You can search for articles from anypage showing a search box see the tip below for ideas about searching.