Jane - Wednesday, August 3, 2016 10:56 AM:
What I try to do is:
1) I have an action added to ItemType XXX, associate the server method to it which follows some business rules to create another item of ItemType YYY.
2) User can find the new item YYY in TOC, then open it manually. They want to open the YYY automatically immediate after its creation.
How can I do this? Any example would be helpful.
Thanks a lot
edonahue - Monday, September 19, 2016 5:01 PM:
To implement your use case you are going to need two methods: one server-side method to execute your business logic, and one client-side method to call the server-side method and then display your item form.
You will also need an Action item with the following criteria to relate to ItemType XXX:
- Type = Item
- Location = Client
- Method = <Client Method Name>
- Target = None
Here is some sample code for a client method that calls a server method called "Some Business Logic".
Your server-side method can then execute just about anything you need it to. Just make sure that it returns the item that you want displayed in the window.
Note: Params from the applyMethod call can be accessed in the server method via this.getProperty(<param name>,<alternate value if null>);