I want to have a window pop up after a task is saved

I want the user to save a task and ifs its a certain task type (a custom field) then I need a popup window with the ID of the task on it like

https://www.whatever.com?id=TASK_ID

This window has info for the user to fill out on another system so I cant automate it.

I have found many places I can put this window.open() but no where that has access to the newly created task's ID.

I wanted to add it to the saveAndClose()  but it still doesn't have access to the task id.

Parents
  • 's suggestion should put you on the right track for opening the window in a new tab, similar but much better than my solution.

    But, just as 's solution of providing a URL requires your user to actually click it and fill the form, opening an extra form requires your user to fill it and not ignore the extra tab on their browser.
    Both have the potential for your user to ignore Whatever.com.

    If you have to make it such that the user cannot wiggle out of entering that data to whatever.com you could consider adding a panel with custom fields for the information that needs to be entered and make those fields required for the particular type of task. 
    Also add a reference to the Whatever.com record in that panel (which may be a useful reference regardless of the method you use to fill things in).
    In an after-save logic hook, if the reference to Whatever.com field is empty, and the whatever custom fields are not, copy the data to Whatever.com and record the reference in your whatever reference field in Sugar.  (This will prevent the next save from running the after-save logic hook again.)
    If you don't want to keep the whatever.com data in Sugar, you can also empty those fields in Sugar once the Whatever.com reference is added.

    To add to the mix of options (there are always so many!) you could check out 's post on the iFrameDrawer (I just came across it today while looking for solutions for your problem - why reinvent the wheel when there is so much information out there)

    https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/integrating-to-sugar-using-a-custom-drawer-action

    I have not tried it, but wouldn't it be nice if you could open your whatever.com page in an iFrame Drawer and make them fill it out right there without changing to a potentially-ignored tab?

    FrancescaS

  • This might be the greatest thing ever for me.  If it works here I have a lot of things I could do with this.

  • I look forward to hearing if you were able to make this work for you!

Reply Children
No Data