Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 143529

How can I auto generate an ID with the data from a customer name and customer email field?

$
0
0

var Sdk = window.Sdk || {};

(function (){
this.BookingNameOnChange = function(executionContext){
var formContext = executionContext.getFormContext();

var uniqueID = formContext.getAttribute('new_bookingname').getValue();
var customerName = formContext.getAttribute('new_customername').getValue();
var customerEmail = formContext.getAttribute('new_customeremail').getValue();

if(uniqueID == null){
formContext.getAttribute('new_bookingname').setValue(customerName + '/' + customerEmail);
}
}
}).call(Sdk);

This is the function I am using. I would like to generate an id with the customer Name and customer Email combined. But It is not working and also not throwing any error.


Viewing all articles
Browse latest Browse all 143529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>