Opens payment details form on button click.Form Submission: Stores details in PaymentDetails table.

marrikruthi
Tera Contributor

Create a table called PaymentDetails with the following fields:

  • Amount: Default value should be 500 and should be read-only.
  • patient id: Auto-populated from the Patient table and read-only.
  • patient name: Auto-populated from the Patient table and read-only.
  • payment options Choice field with options "Cash" and "Card".
  • card number :This field should be visible only if the payment option is "Card".
  • Add Payment Button on Patient Details Form

    1. Add a button on the Patient Details form called "Payment Button".
    2. When the button is clicked, a dialog window should open displaying the payment details form.
    3. The form should allow entering the payment details and submitting them.
    4. On submission, the details should be stored in the PaymentDetails table.
11 REPLIES 11

@marrikruthi 

 

 

 

function openPaymentForm() {
    var dialog = new GlideModal('u_payment_details');
    dialog.setTitle('Payment Details');
    dialog.setSize(600,400);
    dialog.render();
}

 

 

 

Go to System UI > UI Pages

Search "u_payment_details" Record and send me the script

…………………………………………........................................................................................
Mark it helpful 👍and Accept Solution !! If this helps you to understand.

…………………………………………........................................................................................

 

@Satishkumar B can you share the script of UI page

@marrikruthi have you implemented the ask. or just looking for solution?

@Satishkumar B looking for solution

 

marrikruthi
Tera Contributor

After clicking the UI action i am not getting specific fields and im not getting patient id number in the form

marrikruthi_0-1722368724409.png