I'm getting the error "Uncaught TypeError: Cannot read property 'sort' of undefined" in the Dev Console when trying to access the Contacts section after making some basic modifications of the Contacts section page (adding a couple of fields, including a new lookup) which is preventing anything from loading for the Contacts section. Before adding these fields it was working fine.

 

I saw the article https://community.bpmonline.com/articles/uncaught-typeerror-cannot-read-property-sort-undefined for this error, but the resolution for it states it's due to an incorrect application deployment, which seems odd given the minor modifications made all through the wizard. The article also states it's for bpm'onine mobile, which I'm not using. Does anyone have a resolution/know the cause of this?

Like 0

Like

4 comments

Dear Harvey,

Try to run the same script described in the article. Since it affects both web and mobile versions, it should resolve your problem. If you are using cloud version of the application, try to install SQL console and run the script. The SQL console can be downloaded here https://marketplace.bpmonline.com/app/sql-executor-bpmonline

Best regards,

Dean

Dean Parrett,

Hi Dean,

Thanks for the reply - after posting the question I tried running the script but there was already a record with that Id in the table, so it failed based on the Id needing to be unique. I then tried copying that record out to a backup table, deleting the record from the SysLookup table, then running the script in the article (which then ran fine) but the problem persisted in the application. After checking it was still failing, I restored the record from the backup to avoid any unwanted changes.

I'm currently looking into deleting all config changes in the package to see if I can get the Contacts section to work (thankfully few in the package currently) but obviously this wouldn't be a good solution if there were more changes that would be lost! Is there anything else I could try before losing this config?

Thanks,

Harvey

Dear Harvey,

Thank you for the reply. 

If the script could not help and you already have the record with the same ID, I'd suggest you to contact our support team via support@bpmonline.com so that we could look into the issue in your particular environment and find the solution. I believe we might not be able to resolve the issue within the community thread without support team investigation.

Best regards,

Dean

Thanks Dean,

Interestingly exporting the package, deleting it, and then re-importing the package appears to have resolved the issue, but will contact support with this if it happens again.

Best Regards,

Harvey

Show all comments

Hi,

I already done other case landing pages for different bpmonline systems which are working fine.

But for a system, from landing page all required fields are filled but still not submitting and below error is occurring. Not sure about this error and how to resolve it.

Any help will be highly appreciable.

Like 0

Like

1 comments

It's hard to say what's wrong by the screenshot. Please catch the request with Fiddler, save the request and investigate it. If it doesn't contain errors, then send the request to bpm'online support. 

Show all comments

I deleted an object schema and resource file and now I keep getting these errors every time I click Export packages to file system: http://prntscr.com/n38jkr . How can I fix this?

Like 0

Like

2 comments

Hello Jonas,



You can perform some actions that may help you with resolving the issue: try to compile the system http://prntscr.com/n3m333 and update the database structure http://prntscr.com/n3m3es



Please note that configuration is a developer tool and should be used by developers because operations that can be performed via configuration can lead to different errors.



If you will have further questions with this issue I recommend to contact the support team support@bpmonline.com



Best regards,

Alex

I found the mistake. The files where not deleted on the hard drive so it kept looking for them. After deleting everything on the hard drive, the export works again.

Show all comments

Hi,

On my local machine I have landing page for cases.

All mandatory fields are set as default fields.

But once I try to submit than nothing is happening and showing below error on browser console.

Error: Failed to load resource: the server responded with a status of 400 (Bad Request)

 

Note: This issue is not with Order and leads landing pages

 

Any help will be highly appreciable

 

Regards

Like 0

Like

5 comments

Dear Muhammad,

This error usually means that the request you sent to the website server was incorrect and the server couldn't understand it. The 400 Bad Request errors are often caused by pasting the wrong URL. Double check if the landing page field 'website domain' in bpmonline has the correct URL. Apart from that, make sure that the fields in your form are mapped correctly. Here are some more details:

https://academy.bpmonline.com/documents/technic-sdk/7-13/creating-web-c…

If you still face the same issue, we would like to suggest you to contact our support team via email support@bpmonline.com to have a closer look to the issue in your particular environment. 

Best regards,

Dean

Hi Dean,

Thank you for the help. I found that Name, Email and phone are mandatory to use in landing form. Now the issue is gone.

Another issue, on landing form I have Account and Contact fields. I'm entering name of Account and Contact both already exist in CRM. After landing page is submitted the Account is linking with Case without creating a new Account . A new Contact is created that is linked with Case but not linked with Account. Ideally new Contact should created and should be link with Account.

 

Regards

Hi Dean, 

Please ignore above.

Currently I accessing landing page from my local ip that is configured in CRM landing page (Website domain).

For example (http://192.168.0.11/cases_form.html) if I browse its working fine and submission done sucessfuly.

Is it possible by accessing landing page html file cases_form.html for successful submission? If possible than what we should be entered in Website domain of landing page detail?

 

Regards

Dear Muhammad,

There is no other way to access the landing page. You indicated the correct path,but if you open landing page html file cases_form.html in the browser locally,the data will not be submitted into bpm online. You will get the empty message when submitting the form. It would look like this http://prntscr.com/n3h88c

Best regards,

Dean

Dean Parrett,

Noted. Thanks

 

Regards

Show all comments

Hi Community,

we have the following problem, when we make a data load through the consumption of a "REST - WebService"

We would like to know how we could fix the "parse" error so that the execution does not fall ?. This happens when reading a JSON from the WebService.

 

 

 

Newtonsoft.Json.JsonException: Unexpected character while parsing path: 

   at Newtonsoft.Json.Linq.JsonPath.JPath.ParseMain()

   at Newtonsoft.Json.Linq.JToken.SelectToken(String path, Boolean errorWhenNoMatch)

   at Terrasoft.Services.Runtime.JsonResponseBodyParser.FillServiceParameterValues(IEnumerable`1 parameters, JToken responseToken, Dictionary`2 parameterValues)

   at Terrasoft.Services.Runtime.JsonResponseBodyParser.FillComplexArray(ServiceParameter parameter, JArray jsonArray)

   at Terrasoft.Services.Runtime.JsonResponseBodyParser.FillArrayValues(JToken token, ServiceParameter parameter, Type valueType)

   at Terrasoft.Services.Runtime.JsonResponseBodyParser.FillServiceParameterValues(IEnumerable`1 parameters, JToken responseToken, Dictionary`2 parameterValues)

   at Terrasoft.Services.Runtime.JsonResponseBodyParser.Parse(String body, Dictionary`2 dataAdapters)

   at Terrasoft.Services.Runtime.ServiceClientResponse.FillInBodyParameters(Dictionary`2 parameterValues)

   at Terrasoft.Services.Runtime.ServiceClientResponse.ParseResponse()

   at Terrasoft.Services.Runtime.ServiceClientResponse.get_ParameterValues()

   at Terrasoft.Services.WebServiceUserTaskImplementation.FillResponseParameters(IServiceClientResponse response, ProcessWebService userTask, IProcessParametersMetaInfo schema)

   at Terrasoft.Services.WebServiceUserTaskImplementation.Execute(ProcessWebService userTask, ProcessExecutingContext context)

   at Terrasoft.Core.Process.ProcessActivity.Execute(ProcessExecutingContext context)

Like 0

Like

1 comments

Hello,



Basically, the error means that system receives an unexpected json object from web service.



If you use business process element "call web service" to make requests to external web service you should check web service settings.



In case you make a request to a web service via script task i.e. c# code, you should check your code for incorrect casts. 



Also you can simply catch requests and responses from web services via fiddler. With fiddler you are able to view headers, body and other request parameters.



Best regards,

Alex

Show all comments
Article

Case

Please check why I cannot open Opportunities Page in Custom package (user Supervisor). It is loading forever.

Solution

We've recently fixed the issue with opening of the "Page" tab in the section wizard. The reason of the issue was in the same name of the detail and the item on the page. The detail itself is called "Project" and there was an item on the page called "Project" and because of this duplicated name there was an issue with infinite loading (http://prntscr.com/ls2ewe - Project_Test was Project before we've renamed it). But as for now we are able to go to this page, just refresh the page in browser and you will also be able to do so.

Like 0

Like

Share

0 comments
Show all comments

We are currently working on a project that uses the OData protocol with WCF and, even though it's using the exactly same structure of the example from the academy, we are facing some problems when trying to update an object.

Code:

// Creating the context of the BPMonline application.
BPMonline context = new BPMonline(serverUri);
// Determining the method which adds authentication cookie when creating a new request.
context.SendingRequest += new EventHandler<SendingRequestEventArgs>(OnSendingRequestCookie);
// The account on which basis the data will be modified is selected from the accounts collection.
var updateAccount = context.AccountCollection.Where(a => a.Name.Contains("Praxi Solutions do Brasil")).First();
// Modifying the selected account properties.
updateAccount.Web = "www.test.com";
// Saving the modifications in the service data model.
context.UpdateObject(updateAccount);
// Saving the modification of data in BPMonline by one request.
var responces = context.SaveChanges(SaveChangesOptions.Batch);

 

Error:

?xml version="1.0" encoding="utf-8"?>
m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  m:code>2/m:code>
  m:message xml:lang="">The UPDATE statement conflicted with the FOREIGN KEY SAME TABLE constraint "FKvY8UYv12vEuVbKnUeMUSZ4IYo". The conflict occurred in database "0412571-sales-enterprise-marketing-service-enterprise-demo", table "dbo.Account", column 'Id'.The statement has been terminated./m:message>
  m:innererror>
    m:message>The UPDATE statement conflicted with the FOREIGN KEY SAME TABLE constraint "FKvY8UYv12vEuVbKnUeMUSZ4IYo". The conflict occurred in database "0412571-sales-enterprise-marketing-service-enterprise-demo", table "dbo.Account", column 'Id'.The statement has been terminated./m:message>
    m:type>Terrasoft.Common.DbOperationException/m:type>
    m:stacktrace>   at Terrasoft.Core.Entities.Services.ServiceContext.SaveChanges()   at System.Data.Services.DataService`1.BatchDataService.HandleBatchContent(Stream responseStream)/m:stacktrace>
    m:internalexception>
      m:message>The UPDATE statement conflicted with the FOREIGN KEY SAME TABLE constraint "FKvY8UYv12vEuVbKnUeMUSZ4IYo". The conflict occurred in database "0412571-sales-enterprise-marketing-service-enterprise-demo", table "dbo.Account", column 'Id'.The statement has been terminated./m:message>
      m:type>System.Data.SqlClient.SqlException/m:type>
      m:stacktrace>   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean dataReady)   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task task, Boolean usedCache, Boolean asyncWrite, Boolean inRetry)   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean usedCache, Boolean asyncWrite, Boolean inRetry)   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()   at Terrasoft.Core.DB.DBExecutor.FailoverExecute[TResult](DbCommand command, Func`1 func)   at Terrasoft.Core.DB.DBExecutor.Execute(String sqlText, QueryParameterCollection parameters)   at Terrasoft.Core.DB.Query.Execute()   at Terrasoft.Core.Entities.Entity.ExecuteUpdate(Update update, Update parentUpdate)   at Terrasoft.Core.Entities.Entity.UpdateInDB(Boolean validateRequired)/m:stacktrace>
    /m:internalexception>
  /m:innererror>
/m:error>

 

We used the Account object for this example, because we didn't do any customization on it. All the other examples (select, insert and delete) worked perfectly.

Does anyone know how to solve this problem?

File attachments

Like

1 comments

I don't recommend using WCF. It's much better to use http requests.

According your question, most likely that the issue happened due the fact that when you update the "web" field in the account object, the WCF object actually updates all of the fields in the account. If one of the lookup fields in the account was empty, the WCF request will try to update it with Guid.Empty value. This action will generate an error.

You can run fiddler and catch the request that you send. You will see that WCF tryes to update much more than you specified. 

You will not face such an error with http requests. I recommend to use them.

Show all comments