Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Highlighted
Tuned Listener
Posts: 5
Registered: ‎06-02-2014

Issue on opening Dialog box on click of a link from Task pane.

I am customizaing this in saleslogix version 8.1 .

I have added a form which contains button in it. This button has a type as ' link' . 

This form is added in Task Pane.

On click action of this button from taskpane , I have added a C# snippet code to open a new form in dialogbox.

 

When i checked this, I got the Button in the task pane,  

But on click of that button, the dialogbox does not open and the page keeps on refreshing with no results.

 

I have faced this problem only when button is added in task pane.

If it is added in forms in main content or in tabs, it works as expected.

 

Can anybody please suggest me an alternative or how to proceed with this?

I have stuck up at this point and hence not able to proceed further

 

Highlighted
Copper Contributor
Posts: 25
Registered: ‎09-27-2013

Re: Issue on opening Dialog box on click of a link from Task pane.

Hi,

 

Did you resolve this issue? In 7.5.4 I did this, not sure how different it is for 8.1

 

I've added links to the 'Common Tasks' Task Pane before, and the way I've done this is by editing the FillListViewDictionaries or FillDetailViewDictionaries methods in the CommonTasksTasklet.ascx.cs file.

 

Instead of adding a button like you say, you simply add a line intto the relevent Entity array, e.g. if i wanted a link to appear in the Account List view Common Tasks I would edit the accountListTasks array in the FillListViewDictionaries method:

 

string[,] accountListTasks =
{{"tskAddToGroup", "TaskText_AddToGroup","javascript:commonTaskActions.showAdHocList(event);", "false"},
{"tskSaveAsNewGroup","TaskText_SaveAsNew","javascript:commonTaskActions.saveSelectionsAsNewGroup();","false"},
{"tskRemoveFromGroup","TaskText_Remove","javascript:commonTaskActions.removeSelectionsFromGroup();","false"},
{"tskPromote", "TaskText_Promote", "javascript:Sage.Utility.Dashboard.promoteGroupToDashboard();", "false"},
{"tskExportToExcel", "TaskText_Export", "javascript:commonTaskActions.exportToFile();", "false" },
{"tskCallMyDialogMethod", "TaskText_MyDialog", "javascript:FXGetSelections();", "false"}
};
tasksByEntityList.Add("IAccount", accountListTasks);

 

In the above I have added a line that takes the name of the string that will be passed to the items_ItemCommand method ("tskCallMyDialogMethod"), the name of the resource for text of the link(TaskText_MyDialog) - and a javascript function  which you may or may not need!

 

and you'd them need to add a case in your items_ItemCommand method which then calls a method to display your Dialog window.

 

case "tskCallMyDialogMethod":
           CallMyDialog();
            break;

 

 

///here's where i show my dialog

private void CallMyDialog()

{

   DialogService....bla blah blah.

}

 

 

Hope this is useful (would be interested to know if there are better ways to do it, also!)

,