Article

Transferring the first and last name from a landing page form to bpmonline separately

A lot of landing page forms contain separate fields for the first and last name. However, bpmonline has only one "Name" field in the lead object. The following manual describes how to add fields for the first and last name into bpm'online lead object and connect them to the default "Name" field. 

1. Open the advanced settings and go to the configuration. Please check that popups are not blocked in your browser.

 

2. Check if you have a Lead replacing object in a Custom package. Skip this step if you have it.

If you don't have it, please create it.

3. Open the lead replacing object in a custom package. Add new fields for the first and last name and publish it. You will not need to modify c# code if you name the fields in the same way as I am.

UsrContactFirstName

UsrContactLastName

4. Add the "Before saving" event and open the process of the lead object.

5. Create the event sub process. The process should be created exactly the same as my one. Please be attentive and don't miss anything.

var contact = Entity.GetTypedColumnValue("Contact");

if(String.IsNullOrEmpty(contact)){

var firstName = Entity.GetTypedColumnValue("UsrContactFirstName");

var lastName = Entity.GetTypedColumnValue("UsrContactLastName");

if(String.IsNullOrEmpty(lastName)){

Entity.SetColumnValue("Contact", firstName);

}else{

Entity.SetColumnValue("Contact", firstName + " " + lastName);

}

}

return true;

6. Once you finish, please check that you can create a new lead in the system. If you can't, then you missed something in the business process. Please fix it and publish it again.

If everything is OK, please feel free to use the UsrContactFirstName and UsrContactLastName in your landing pages as the first and last name. The process will combine them to the Name field in bpm'online automatically.

 

 

 

 

 

Like 0

Like

Share

4 comments

Is there an update to this page using the current process designer? The designer looks nothing like the screenshots now, and the "Modify Data" widget doesn't seem to be available.

Hello Jeffrey,

 

Hope you're doing well.

 

Even the configuration design looks different now (as far as starting from version 7.17 the new UI design was implemented) you can perform the steps above. For example, if you want to add the process for the needed object, you just need to open the object and click the "Open Process" button:

 

About the question according to the process elements: starting from the version 7.15 there was changed the list of available elements due to functional logic and were left the most usable and popular elements for this kind of processes:

 

More information about the new UI design for configuration you can find in the article below:

https://academy.creatio.com/docs/developer/development_tools/developmenā€¦

 

Best regards,

Roman

Hi,



I tried the following. I kept getting a 502 error.

 

Error while sending request response status: 502 (Bad Gateway) request url: ../DataService/json/SyncReply/UpdateQuery method: POST request data: {"rootSchemaName":"Lead","operationType":2,"includeProcessExecutionData":true,"filters":{"items":{"primaryColumnFilter":

 

Removing the "process" fixes my 502.



Any thoughts?



Best Regards,

Solem A

Hello Solem,

 

Please try to check the "Lead" object settings, for example, if there is defined the Primary Column value, maybe some wrong configurations for object columns. So you can also publish the object / generate the source code and compile the application.

 

In case if the issue persists after those actions and you need to see the exact exception message, please open the developer tool console in your browser (e.g. Google Chrome developers console (Ctr+Shift+I)), go to the "Network" tab, catch the request and read a message in the "Response" and "Preview" tabs. Then please send the text of an error from the  "Response" or "Preview" tabs.

 

Best regards,

Roman

Show all comments