How to create a text box that will display when clicking 'Resolve' button in Service Portal

Raphael Dizon
Mega Expert

Hello,

I have a task wherein when a user clicks the 'Resolve' button it will prompt a separate text box that requires them to enter 'Additional Comments' and it will reflect in the additional comments widget which is not located in the same widget as the 'Resolve' button. I am new to portal development so any help is much appreciated. Thank you.

find_real_file.png

Kind Regards,

Raphael

1 ACCEPTED SOLUTION

michaelmcaliste
Kilo Guru
Hi Raphael Dizon,
 
I had a similar requirement to ask for comments when someone rejected an approval request. I cloned the widget and used the $uibModal service to popup a message asking for comment. Then passed that back to the server to update the record. Does that sound like what you are after?

find_real_file.png

Regards,

Michael.

 

P.S. If my suggestion helped then please mark as helpful and/or correct so other community members can benefit from this information. 

View solution in original post

7 REPLIES 7

Varsha21
Giga Guru

Hi,

i think you should try on same widget only.

 

Thanks

Shubham52
Giga Contributor

Hi,

You can use Broadcast events to achieve this requirement.

Just you have to do is 

1. Create a onClick function on Resolve button.

2. Set a flag or temporary variable on onClick function and pass it in different widget using Broadcast.

3. In another widget, receive that variable value and then you can manipulate accordingly.

Let me know if you have any other questions related this.

Mark Correct if it helps.

Where should I add the onClick function in the server script or client script? Our resolve button already has an existing ng-click function which is when clicked, it will call the function that resolves the ticket. 

HTML:

 <button type="button" name="resolve" ng-if="data.canResolve == true" class="btn btn-success" style="margin-top:10px;width:90px" ng-click="c.action('resolved')">${Resolve}</button>

 

Server and Client Script:

find_real_file.png

michaelmcaliste
Kilo Guru
Hi Raphael Dizon,
 
I had a similar requirement to ask for comments when someone rejected an approval request. I cloned the widget and used the $uibModal service to popup a message asking for comment. Then passed that back to the server to update the record. Does that sound like what you are after?

find_real_file.png

Regards,

Michael.

 

P.S. If my suggestion helped then please mark as helpful and/or correct so other community members can benefit from this information.