ZDK Client Function | Description |
setVisibility() | Show or Hide a button or text component of a Wizard |
setContent(value) | Set text content for the text element. |
getElementByID(element_id) | Get the UIElement object. |
transitionTo(api_name) | Makes the transition to the specified screen |
getComponent(record-create-wizard) | To fetch the component details like screen information of a Wizard. record-create-wizard - is the default value of the Wizard component name. |
switch (field_name) { case 'Quantity': var qty = ZDK.Page.getField("Quantity"); if ((ZDK.Page.getField("Choose_the_category").getValue() == "Surgical Instruments") && (qty.getValue() < 100)) { qty.showError("Minimum order quanity should be 100 pieces"); } else if ((ZDK.Page.getField("Choose_the_category").getValue() == "Masks") && (qty.getValue() < 1000)){ qty.showError("Minimum order quanity should be 1000 pieces"); } break; case 'Is_the_shipping_address_same_as_thbilling_address': var billAdd = ZDK.Page.getField("Billing_Address"); var shipAdd = ZDK.Page.getField("Shipping_Address"); shipAdd.setValue(billAdd.getValue()); break; case 'Payment_Method': var payment = ZDK.Page.getField("Payment_Method"); if (payment.getValue() != "COD") { log(ZDK.Page.getComponent('record-create-wizard')); ZDK.Page.getComponent("record-create-wizard").transitionTo("Screen_2"); break; } case 'Select_the_Country': var Text1 = ZDK.UI.getElementByID('Text_1'); if (ZDK.Page.getField("Select_the_Country").getValue() == 'India') { Text1.setContent("Your order will be shipped using Blue Dart courier service. Track your orders using this link."); } else if (ZDK.Page.getField("Select_the_Country").getValue() == 'US') { Text1.setContent("Your order will be shipped using FedEx courier service. Track your orders using this link"); } break; } |
Writer is a powerful online word processor, designed for collaborative work.