Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simphony 2.9: Request Custom Dialog through C#

Status
Not open for further replies.

ffcnnodes

Programmer
Feb 12, 2018
1
CL
Hello !

I need to create a Custom Dialog for user input, kind of like a Search Request but with extra inputs.

I'm new to this and what I've managed to acomplish so far is to create an Extensibility Application and launch a method using a button, I've launched an Search Request and since it's not exactly what I need I've been trying to create a Custom Dialog with no luck so far.

Just to give context this is how I launched the Search Request
Code:
      List<OpsSelectionEntry> list = new List<OpsSelectionEntry>(){
        new OpsSelectionEntry(0, "Diana A. Powell", 0, null, false),
        new OpsSelectionEntry(1, "Dorsey A. Roberts", 1, null, false),
        new OpsSelectionEntry(2, "Ashley D. Brown", 2, null, false),
        new OpsSelectionEntry(3, "Madalyn Schaefer", 3, null, false),
        new OpsSelectionEntry(4, "Sadie Corkery", 4, null, false),
        new OpsSelectionEntry(5, "Jackson Sanford", 5, null, false),
        new OpsSelectionEntry(6, "Emerson Altenwerth", 6, null, false)
      };
      Nullable<Int32> selectedEntry = OpsContext.SearchRequest("Title", "Prompt", list);
      string message = "Null";
      if(selectedEntry.HasValue){
        message = string.Format("You selected {0}", list[selectedEntry.Value].Name);
      } else {
        message = "Operation cancelled";
      }
      OpsContext.ShowMessage(message);

And I've also tried to launch a custom request using this method which recieves a string for the content name of a resource. I tried going into the EMC then Setup -> Custom Content -> Content and defining a Sim script there. but when I try to launch the request it says that the content could not be found.
Code:
OpsContext.RequestCustomDialog("message", "title", "SIMTEST", null);

I'm kind of stuck and don't know where to go from here. Can you help me ?

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top