Hi all,
Is there a way to create a new customer tenant with the first admin user (first admin user should get the welcome email) programmatically using trigger in rollbase?
Thanks in advance.
Hi,
You can perform this action using the createCustomer() method.
This starts the process of creating a new customer tenant. A welcome email containing a temporary password is sent to the first administrative user when the process is complete.
If the password field is included in the list of fields, as in the example below, its value is used as the password for the first administrative user. In this case, the system does not send the welcome email to first administrative user and the password will not expire after the first log in.
Specific Example
DataField[] arr = new DataField[7];
arr[0] = getField("companyName", "API Test");
arr[1] = getField("email", "myemail@mycompany.com");
arr[2] = getField("lastName", "Admin");
arr[3] = getField("loginName", "myemail@mycompany.com");
arr[4] = getField("timeZone", "Pacific/Guam");
arr[5] = getField("mailSender", "noreply@mycompany.com");
arr[6] = getField("password", "my_password");
binding.createCustomer(sessionId, new DataFieldArr(arr), true);
Please refer the documentation url related to this method for more info:
http://documentation.progress.com/output/Rollbase/index.html#page/rb/Rollbase.752.html
Hope this helps.
Regards,
Mani.
Hi Mani,
Thank you for your reply.
The above you mentioned is a SOAP method to create a customer. In my case it is a rollbase application itself to create a new customer on conditions. Do you think the above method can be used for the same? and if it is, can you give more detail on how?
Thanks again.
You can also use "Create new record" trigger and map data from your record (say, Lead) into Customer.
I am exactly trying with the same 'create new record' trigger and it is creating the customer record but not its' first subscriber - first admin. I couldnt figure out what I m really missing..
Please make sure that you're mapping info necessary to create First admin user:
- Login name
- Email address
Those fields have been mapped correctly to relevant customer fields and they are getting the values on creation.
I notice something that the login name is being removed after a successful creation of a customer (when doing it manually) but in this case it is remaining with the field, suspecting the process is not complete.
Do you thing that this could be a permission issue? Is there any way to trace the error log for the cause?