News & Activity Feed

Monday, September 25, 2017 11:11 AM | finbar murphy
We have a circumstance where web.dataview fails with the following error, and essentially freezes our applicaton

How can we debug this, where is the -debug.js version of the code located


combined-8.6.5.11.en-gb.js?_spa:130 Uncaught TypeError: Cannot read property 'top' of undefined
at Web.DataView.MobileGrid.refresh (combined-8.6.5.11.en-gb.js?_spa:130)
at p (combined-8.6.5.11.en-gb.js?_spa:130)
at combined-8.6.5.11.en-gb.js?_spa:130
Monday, September 25, 2017 6:46 AM | shekhar
While creating user control we want to show sidebar as all other pages are having sidebars , it is looking odd on custom pages.
Sunday, September 24, 2017 8:36 PM | Ramy
I want to create easy timesheet app with COT. Is there any sample app or how to create timesheet app that users can enter their time in a weekly bases.

I appreciate any help...

Thanks,
Ramy Abaas
Sunday, September 24, 2017 1:19 PM | Umesh Sharma
I am using EnumerateDynamicAccessControlRules in shared business rules and not getting desired results. I want the results like show all records which are submitted, reported by all users in current user department + all records related of his department.

I am registering these types of access control rules -

/////////////////
RegisterAccessControlRule(
"ReportedBy",
"select UserID from users where users.DepartmentID = @DepartmentID",
AccessPermission.Allow,
new SqlParam("@DepartmentID", DepartmentID));

RegisterAccessControlRule(
"SubmmittedBy",
"select UserID from users where users.DepartmentID = @DepartmentID",
AccessPermission.Allow,
new SqlParam("@DepartmentID", DepartmentID));

RegisterAccessControlRule(
"DepartmentID",
"select DepartmentID from Departments where DepartmentID = @DepartmentID",
AccessPermission.Allow,
new SqlParam("@DepartmentID", DepartmentID));

////////////////

Checked @DepartmentID passed is ok in visual studio debugging.

My queries are-
1. What will happen, if 'ReportedBy' is null.
2. What will happen if 'Submittedby' is not in the a controller
3. Whether results will be mutually exclusive, if more than two rules are defiend (as it is AccessPermission.Allow, whether results will be cumulative allowed by two rules.

Thanks

Umesh Sharma
Saturday, September 23, 2017 7:54 AM | Jon
Hi all,

I have a grid with one field that creates a link to a popup page.

COT offers the usual _self, _blank window constants however, I want to name my popup window so that the same window is used for all popups from this page.

I have worked out that I can do this with a little javascript/JQuery by removing the "onclick" and replacing with a new function.

However, not in pageload, window load or document ready can I access the grid markup.

before and after/execute ControllerAction's are too early in the page cycle and I really don't want to use a timer.

Is there an event I can hook into from COT data javascript functions that will tell me when the grid has completed rendering on the page?

many thanks,

jON
Saturday, September 23, 2017 7:13 AM | Umesh Sharma
How I can change the sitemap from c# business rule. I have seen this thread, but things are not clear from it.
http://community.codeontime.com/codeo...

Basically I want admin to restrict page visibility based on roles they are assigned. When admin define new role, he will define the visibility of different page for that role and based on these data a different sitemap will be presented to user based on his role.

Thanks

Umesh
Friday, September 22, 2017 8:23 PM | Tony Gallacher
I am having some issues with debugging in Visual Studio 2017.
Whenever I debug a new code page I created to process payments I keep getting the following error thrown in my try/catch statement.

"Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

Without debugging the process works in the app and I can successfully process a payment using Stripe and after payment it does write to the payment table.

I am adding additional code to allocate payment to invoices but need to debug it in VS2017.

Does anyone know why the Newtonsoft.json assembly is causing this error during debugging?
Friday, September 22, 2017 6:51 PM | Tom Kustura
Adding this tag in COT 8.6.5 does not work as described here: http://codeontime.com/learn/data-cont...

Tested in a clean Northwind application with same results, calendar dates are bolded for dates where record exists, and COT calculates the number of records.

Friday, September 22, 2017 3:33 PM | Umesh Sharma
How to get RoleID & UserID of current user in C# business Rules.

My implementation will have only one role for user and UserId is Guid

Thanks
Friday, September 22, 2017 1:06 AM | Jan K. van Dalen
Please consider adding support for Here mapping (previously Nokia)

https://developer.here.com/

Pricing is much better than google maps.
Thursday, September 21, 2017 4:30 PM | Brad Gall
I'm following this page
https://codeontime.com/learn/getting-...
and this video
https://www.youtube.com/watch?time_co...
Which are the same tutorial.

The issue is when I add a chart view to the controller the page just shows that it Loading... but it never loads.

I'm at a loss at what to look at. Anyone have any ideas what might be wrong or what I should be looking at to get past this error.

So far I've tried recreating the controller and chart view a couple of times as well as loading the site in a couple of different browsers to rule out some odd caching issue.

Ideas and suggestions are much appreciated.
Thursday, September 21, 2017 12:05 AM | Jonesy
I have a lookup where I choose values from a grid.
The lookup is filtered using Context Fields.
It is filtering correctly on "SiteID" but how can I change the filter to display the Site name instead of the ID?
I can't filter on the Site Name as there may be other sites with the same name in the database.
Can I concatenate the filter string in the context field somehow?



Cheers
Jonesy
Wednesday, September 20, 2017 10:11 PM | Patrick Saunders
Since I have updated to latest version, I have having issues with dates decrementing by one day.

What is strange, is that even in the code it shows correctly, so somehow it is getting decremented/altered when inserted into database.
I have not made any changes to hosting/DB server at all (for years), only the COT framework.

Wednesday, September 20, 2017 6:46 PM | Tom Kustura
We would like to execute a business rule only when a "dirty" record is being saved, in other words the "Update" query actually saves updated data.

We couldn't find a way to detect if record actually has new data on the form because the "Update" action always executes the Post command to the server when clicked, regardless of the fact that no data has changed on the form.

So we wrote a SQL business rule that checks every field and compares field value to "_OldVale" for the field. This worked until... on our forms we have an action that keeps the form open after user clicks "Save" button. This action is "Edit, editForm1 when Update, Save". The problem is that the "_OldValue" for fields remains the Old-Old value, meaning the value in "_OldValue" variable is the value from when the form was opened the first time.

So, if a user opens a form, makes a change to a field, clicks "Save", then makes a change to another field, clicks "Save", the system still thinks that two fields were changed in that "session".

The behavior was replicated on a clean Northwind project also.

Is this a bug in COT?

Is there a way to accomplish our original goal of executing a Business Rule when record is "dirty" without having to write a bunch of SQL code?
Wednesday, September 20, 2017 6:27 PM | Chuck
I'd like to be able to set the Page Title in code (it's dynamic). I see articles on how to override Me.Title in the desktop apps, but what about for Touch?
Wednesday, September 20, 2017 2:05 PM | Crystine Adams
I am creating an application with multiple pages. Each page uses the same data controller, but has a grid view with a filter based on a field called AppID, so that each page will only show data with that particular AppID. When a user creates a new record I need the AppID field to default to the value I am filtering by in my view. I am able to create a default value for this field, but I get the same value for all pages.
Wednesday, September 20, 2017 9:36 AM | Rahul Jain
Hello,

Any update on offline capabilities??
We have a new project which depends entirely on offline capabilities.

Regards,
Rahul Jain
Tuesday, September 19, 2017 9:35 PM | Michael Wedge
I am building a Master/Child form and I am getting this error. Any help would be appreciated.

Component: view1
Controller: SamplesOrder; View: ; Timed out: false; Status Code: HSR;
Exception: System.Data.SqlClient.SqlException
Message: Invalid column name 'SamplesOrdLines'.
Stack:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Bool...
Tuesday, September 19, 2017 3:24 PM | Alessandro
Hi dear COT crew!
I have a grid with several movie entries, each one of them having a trailer field
How can I manage to add an anchor tag to this specific field in a row in such a way for a user to be able to play the corresponding trailer or --if that is not feasible, add this anchor tag to the edit form?
As ever, thank you very much indeed.
Alessandro
Tuesday, September 19, 2017 2:19 PM | Dustin Edgeman
I am getting a character limit which looks like 25 characters when I am trying to batch edit a field that is nvarcharMAX. I am able to edit individual records and add as much text as I would like. This is just batch edit that limits what I can enter. Oddly enough the batch edit field appears very large like it is meant to hold notes. Any ideas?
See All Posts