LS HTML Client, weird Date issue

Here's a strange one... In an application that I've just made, upon saving a record, LS seems to automatically modify the date of the record by exactly minus 1 day (say from 9/17 to 9/16). Now, there is some criteria for this to happen:
1. An value must be modified that has not previously been modified in the record.  An example would be "Temperature", this is a required INT.  If I start a record and leave it at 0, Save, then go back into the record and add a value and
Save, the date on the record is automatically changed back a day.
Here's the kicker... the date change is only visual, the date value in the DB has not changed.  As soon as I hit F5 on my browser the date is correctly updated back to what was originally saved.
The app does not have any events happening in the Updated/Updating/Inserting/Inserted methods.  The date is automatically added in the _Created event for the DB Entity.
(this happens in both debug mode and when published to an Azure website).

Hi!
I've been having the exact same problem and unfortunately the workaround proposed above did not fix the issue or this workaround (from http://stackoverflow.com/questions/28483086/datetime-textbox-in-lightswitch-html-increments-one-hour-on-save/28491688#28491688)
// Open msls-2.5.2.js
// Locate this section of code:
entitySet._loadedEntities[entityData.__metadata.uri] = entity;
} else if (entityState === _EntityState.modified) {
originalEntityData = entityData.__original;
$.each(entityDetails.properties.all(), function (j, property) {
// You need to add:
convertDatesToLocal(changeResponse.data);
// Example:
entitySet._loadedEntities[entityData.__metadata.uri] = entity;
} else if (entityState === _EntityState.modified) {
convertDatesToLocal(changeResponse.data);
originalEntityData = entityData.__original;
$.each(entityDetails.properties.all(), function (j, property) {
// Hope this helps.
One fortunate thing is that the change is only 'visual'.. so I'm okay with it for now although I would love to have a fix for this until I wait for VS 2015.
Thanks,
Mani

Similar Messages

  • Very weird date issue.

    I have a client that is using CFMX7 Enterprise and an Oracle database. One of the database fields we're pulling in is a date. If the date/time is 04/04/2010 02:xx (2am range), coldfusion is automatically adding an hour to it and making it 03:xx.  I changed the time in the field to 1am and 3am and it worked fine with both those numbers and I also left the time at 2am and changed the date to 04/05/2010 and the time remained correct.
    Is there some daylight savings time issue from CF7?  Anybody have a work around, besides putting in a catch for this specific date and time?

    With a version of ColdFusion as old as CF7 you have to be aware that the daylight saving rules in the United States changed since that version was released.  If the JVM has not been updated to understand the new rules, then that version is going to be operating on the previous set of day light savings rules.
    http://kb2.adobe.com/cps/447/d2ab4470.html

  • How can I wait till data is loaded and get the latest entities in HTML CLient

    This is my first try using a JavaScript component. I found a nice timeline-Scheduler on github:
    Timeline Javascript Scheduler
    I made an nearly empt new Screen and I am using LS only to get the data and to switch to the next date.
    This works fine for the first date I set in the created.
    But if I change to the next day, there are still the just loaded records. When I switch again to the following date I get the records from the day before...
    myapp.dispo.divcontainer_render = function (element, contentItem) {
    // We need this div for the timeline
    $(element).append('<div class="calendar"></div><div class="realtime-info"></div>');
    //Bind to the date
    contentItem.dataBind("screen.suchDispodat", function (value) {
    var querydat = value;
    var items = [];
    var sections = [];
    //The querydat is set to the right date but the records I get are from the last executed query.
    contentItem.screen.getQuerydispobydatfahrerorderfahrer(querydat).then(function (result) {
    var dispos = result.data;
    dispos.forEach(function (dispo) {
    How can I bind the refresh to something like data loaded?
    Helmut

    From:
    http://blogs.msdn.com/b/lightswitch/archive/2012/12/19/enhancing-lightswitch-controls-with-jquery-mobile-michael-zlatkovsky.aspx
    "You could use setTimeout (which is sometimes necessary – see Joe’s Custom Controls post
    for an example)"
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • LightSwitch is not showing related data - HTML Client

    The AddEdit screen doesn't display any related data, but if I press the Save button without making any changes, close the screen & reopen it, it then shows the data just for that particular record. 
    For example I have an Employee entity & it has a GenderID(foreign key)  which is coming from Gender table. When I open the Employee’s Add/Edit screen the Gender appears blank. If I hit the Save button without doing any data changes, close the screen
    & reopen it & it then shows the Gender correctly.
    Fiddler shows it is querying correctly & also getting the response, but somehow it
    doesn’t appear on the screen. I’ve checked the Add/Edit screen of other entities & it seems the problem is specific to this one only.  I’ve also created a new Add/Edit screen for the same entity & it has the same problem.
    Divyang Vyas

    Manage include data may help:
    LightSwitch Tips & Tricks on Query Performance
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • Sizing the HTML client's content area above the footer

    As I'm fairly new to the intricacies of the HTML client, I've a simple question with hopefully a simple answer.
    Having designed the following screen (containing a custom scheduling control above a standard LS table) I've found that the footer (class: mssl-footer, data-role: footer) is overlaid on top of the content area (class: mssl-content, data-role: content): -
    As a result, the lower portion of the table is obscured (in the above screen-shot I've adjusted the opacity of the footer to illustrate this overlay).  As a consequence this will make scrolling the table and viewing the entries slightly awkward
    and it looks a bit messy.
    So the question I have is, what's the 'best-practice' approach to avoid this overlay and have the content area stop short just above the footer?
    Any guidance on how to address this would be appreciated.
    Kind regards,
    Chris

    I don't know the answer but I would love to see a sample project that uses this custom control. I need to implement something very similar but am not a developer just and admin trying to use Lightswitch in a small business.
    Hi Dave,
    I've only just noticed your question regarding the scheduling control (as it was posted against a temporary user account I don't monitor) so apologies for the delay in replying.
    The control in the screen-shot is the
    dhtmlxScheduler which works very well with LightSwitch and offers a great set of features.
    Also, for Sergey, we addressed the sizing issue with a change to the msls LightSwitch library as covered in the following post: -
    HTML Client Custom Control Stretch to Container Sizing Bug, Problem?
    HTH,
    Chris

  • DATE issue in UIX page

    Dear All,
    I am having a weird date related issue while loading a date value. We show date values in Uix pages, all the Oracle.sql.Date (which in turn convered to java.sql.Data)are displayed a day less in the UIX. The dates are shown in <textInput> or <messageTextInput> or <formattedText> fields. For ex: if the DB date is 05/11/2004, it is shown as 04/11/2004 in the screens. The dates stored and the retreived in the java middle tier are same, but the value printed in the UIX is a day less. The server time maintained is EST and this application is used by the clients in US.
    The things work fine when run on the local machines pointing to the same database. But, when a server is accessed from the same client machine the problem is simulated.
    This is a production issue which needs to be addressed immediately.
    Please send your inputs on this.
    Thanking in advance.
    Girish S C

    There were a couple of bugs related to the date lag problem that you reported. These should have been fixed in latest releases of UIX (The last such bug identified has been fixed in version 2.2.12, the latest as of date being 2.2.16). You would have to wait until this is publicly available and upgrade to this version.

  • Runtime Error in VS2012 (Update4) LightSwitch HTML Client

    I have a desktop (Silverlight) application, I upgraded the project to add the HTML Client. Now when I run the HTML Client, it shows this message box on the browser:
    "The application could not be loaded. Please try refreshing the page. Failed to load model: failed to parse the model JSON string. Failure reason: syntax error."
    I started my desktop application in VS2012 Update 2, and now it is in the Update 4. The interesting thing is that when I make new Project and then add HTML Client, I will not receive this error and it works fine.
    It shows this error only on that specific project (Which I started on VS2012 Update2, later Update3 and now Update4) and that project is very big (more than 100 tables and screens), therefore I can not make that from scratch again.
    I have to add HTML Client to my project. I really appreciate if someone can help me.

    "The application could not be loaded. Please try refreshing the page. Failed to load model: failed to parse the model JSON string. Failure reason: syntax error."
    Hi Keysen,
    First you need install Microsoft.LightSwitch.Client.JavaScript.Runtime 2.5.2. This update can be downloaded from the NuGet Gallery, see:
    http://www.nuget.org/packages/Microsoft.LightSwitch.Client.JavaScript.Runtime/
    Because this issue is project specific, you can also turn the build output, in the
    Options window, find Projects and Solutions >> 
    Build and Run. Find Diagnostic in the drop-down for MSBuild project build output verbosity. It will give detailed information why this happens.
    Please let me know if there is anything that I can do to help.
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • VPD date issue between 10.1 and 10.2 databases

    I have uncovered an issue today with VPD against date fields. The issue came up at a client site on a 10.2 database. When I got back to the hotel and tried this on my own database, which is 10.1, I got no issue and everything worked ok.
    Therefore, I am asking if anyone is able to try out the following for me on different Oracle databases and platforms and let me know whether it worked for you or not. I'd like to compile a list of database versions and platforms on which the issue occurs.
    Step 1: create this table as a user
    CREATE TABLE TST_DATE AS (
    SELECT 1 PERSON_UID,
    Trunc(SYSDATE) BIRTH_DATE,
    To_Char(Trunc(SYSDATE), 'DD-MON-YYYY') CHAR_DATE,
    123456 TAX_ID,
    'Smith, Michael B.' FULL_NAME FROM dual);
    Step 2: grant select rights on the table
    GRANT SELECT ON TST_DATE TO PUBLIC;
    Step 3: switch your login to SYS and run this script:
    CREATE OR REPLACE FUNCTION F_CHECK_ITEM_TST(p_object_schema in varchar2, p_object_name varchar2)
    RETURN VARCHAR2 IS
    V_PREDICATE VARCHAR2(2000) := '1 = 2';
    BEGIN
    RETURN(V_PREDICATE);
    END F_CHECK_ITEM_TST;
    Step 4: As SYS, run this to grant access rights over the function
    GRANT EXECUTE ON F_CHECK_ITEM_TST TO PUBLIC;
    Step 5: As SYS, run this to enable the policy
    BEGIN DBMS_RLS.ADD_POLICY(
    OBJECT_SCHEMA => 'DRAKE',
    OBJECT_NAME => 'TST_DATE',
    POLICY_NAME => 'SecByTST',
    FUNCTION_SCHEMA => 'SYS',
    POLICY_FUNCTION => 'F_CHECK_ITEM_TST',
    STATEMENT_TYPES => 'SELECT',
    POLICY_TYPE => DBMS_RLS.DYNAMIC,
    SEC_RELEVANT_COLS => 'BIRTH_DATE',
    SEC_RELEVANT_COLS_OPT => DBMS_RLS.ALL_ROWS);
    END;
    Note: in the above policy change the OBJECT_SCHEMA name to be the name of the user who owns the table you created in Step 1
    Step 6: Go into Discoverer Admin and import the table as a new folder.
    Be sure to uncheck the "Date hierarchies" box and set "Default aggregate on data points" to detail. Grant access to any user.
    Step 7: Using Desktop or Plus, log in as that user then try to query the folder with the date not included, there should be no problem.
    Step 8: Now try to query with the date included
    On my 10.2 database I get ORA-24334: no descriptor for this position. This happens when logged into Discoverer as the table owner, EUL owner or any other user. However, when logged into Discoverer as SYS which is exempt from all VPD policies, there is no error when the date is included.
    We tried this in Discoverer Desktop, Plus and Viewer with the same results in all three. We can successfully query the table from SQL*Plus, SQL Developer and TOAD.
    There also seems to be no issue at all with the 10.1 database so there seems to be an issue between Discoverer and the 10.2 database.
    What do you think?
    P.S. to cancel the policy use this script when logged in as SYS:
    EXEC DBMS_RLS.drop_policy(
    OBJECT_SCHEMA => 'DRAKE',
    OBJECT_NAME => 'TST_DATE',
    POLICY_NAME => 'SecByTST');
    This same information is available on my blog in a more readable format here:
    http://learndiscoverer.blogspot.com/2006/12/vpd-date-issue-between-101-and-102.html

    Hi Rod
    Well don't you just love Oracle. Obviously, whatever tests were done for certifying Discoverer against the 10.2 database did not include checking VPD policies. This merits a blog entry from me.
    Your workaround for V_PREDICATE VARCHAR2(2000) := 'BIRTH_DATE=TO_DATE(''01-JAN-0001'')'; works. However, I had to write a new function to do this because my real function was trapping about a dozen items at the same time, some dates, some numbers and some varchars - exactly the way that the Oracle example code shows it in the 10.2 database manual.
    So what I did was to create a new function that only handles dates and added a dedicated policy that works with only that function. Unfortuately, because I have many dates to manage, I was unabe to hard code the BIRTH_DATE so here is what I did:
    V_PREDICATE VARCHAR2(2000) := 'SYSDATE = TO_DATE(''01-JAN-0001'')';
    This works perfectly and Discoverer stopped complaining. It just has two policies on the same table for different data items. Isn't VPD cool? I'm hooked.
    I really appreciate your time and effort on this. Now, let's see what Oracle support make of the issue because I raised a service request last night. No reply yet I'm afraid.
    Best wishes
    Michael

  • Lightswitch HTML Client - Detail picker for each related List Item

    I have a doubt in Lightswitch Html Client application.
    Scenario:
    Suppose i have two tables  "Property" and "PropertyVaues".
    A Property can have many PropertyValues is the relationship between them.
    I want to show the data on screen like below:
    Property List:
    XYZ            [___10____(+)]
    MNO          [___abc____(+)]
    PQR           [___30.5___(+)]
    Xyz  is the list item
    assume [___10____(+)]  is the detail picker of
    PropertyValues which allow to select one value related to
    XYZ Property item, and same for other list items.
    Only Related "PropertyValues" for each list item must be available in the detail picker.
    Please help me out if any one has the solution to solve it.
    Or you can give me any other way to accomplish the above scenario.
    Thanks

    Hello Josh,
    I am implementing it on AddEdit screen.
                      (1)                                              
    (2)                           
    Screen description:
    [Note: Some Images are in my next post]
    1. Image(1) shows the list of properties (GSM, Mill Name, CMS). These Properties have its respective property values in drop down.
    2. When i select any value from the dropdown list (eg. 10 from GSM). the value is assigned to all other drop down.
    [shown in image(3) next post]
    (4) Again when suppose i select value for "Mill Name" Property as "Abc", it is assigned to all other drop down.
    [shown in image(4) next post]
    I want that a property value must be assigned to its respective Property only.
    Please help me on this. Or suggest me another way out to accomplish such scenario.
    Thanks
    Ravi Patel

  • How to convert server specific date string into client specific date object

    Hi developers,
    I have a very complex issue to convert the server date string format "EEE MMM dd HH:mm:ss z yyyy" into java.util.Date object and find the difference of the client machine date to represent the elapsed time
    The problem is the server time zone and client time zone are not unique and when I try to covert the server date which is in string format to date format using SimpleDateFormat class , I got the server time as 3:30 hours appended to it. The server time zone is in IST and Client time zone format is GMT+5:30 , the appended time of 3:30 hours created the confusion in calculating the elapsed time between the server started time and client requested time
    I went through all the sites but none of them were useful
    If any help to solve the above issue is appriciated
    please send the response with the same subject line
    Advance Thanks

    Why don't you just subtract from the server time the 3:30 hours (consult api of java.util.date) before comparing with the client date? Hard to see where's the problem...

  • How to setup mail client in Data Integrator 11.7 to make use of mail_to()

    How to setup mail client in Data Integrator 11.7 to make use of mail_to() function.
    I am using mail_to() function in one of my job to know the status of source file. If source file is not ready, our DI job should fail and send mail notification with reason for failure.
    But mail_to() function is not sending any mail. I guess I need to set up email client.
    Any one please help to resolve this issue.
    Thanks
    Phani

    From the DI documentation that comes with the installation:
    To use this function, a mail client must be installed and running on the Job
    Server computer that calls the function. The login account for the mail client
    must have the same user name and password as the Data Integrator service.
    The type of client varies by the operating system:
    u2022 If the Job Server is on a computer running the Windows operating
    system, then the mail client must comply with MAPI (message application
    programming interface). In addition, the mail client must be configured as
    the default mail client. For example, Microsoft Outlook is a MAPI-based
    mail client.
    If the Job Server is on a computer running the UNIX operating system,
    then the mail client must be mailx-compliant.
    So:
    Mail client installed and configured and set as default
    Mail client uses the same credentials as the job server service
    Or use another function: smtp_to();
    If still not working or you are not allowed to use an installed mailclient on your box, then try Blat: http://www.blat.net/

  • SSRS reports from Lightswitch Html Client

    I have created a Lightswitch desktop application that list the available reports that are stored in a table and also provides a button that when clicked launches the web browser to the URL for the report on the SQL server. My problem is now I'm trying to
    create the HTML client for the application and have no experience with Java Script. Does anyone know how to accomplish the something that I did on the desktop application on the HTML client?
    Below is the code that I used to open the URL in the browser in the desktop application.
    Imports Microsoft.LightSwitch.Threading
    Imports System.Runtime.InteropServices.Automation
    Namespace LightSwitchApplication
    Public Class ListReports
    Private Sub RunReport_Execute()
    ' Write your code here.
    Dim uri As New Uri(ReportsSet.SelectedItem.ReportAddress) 'website stored in the ReportsSet.ReportAddress field
    If (AutomationFactory.IsAvailable) Then
    Dim shell = AutomationFactory.CreateObject("Shell.Application")
    shell.ShellExecute(uri.ToString)
    ElseIf (Not System.Windows.Application.Current.IsRunningOutOfBrowser) Then
    System.Windows.Browser.HtmlPage.Window.Navigate(uri, "_blank")
    End If
    End Sub
    End Class
    End Namespace

    This may help:
    Creating Reports in LightSwitch HTML Client
    // Show Loading message
    var LoadingDiv = $("<div></div>");
    var Loading = $("<h1>&nbsp;&nbsp;&nbsp;&nbsp;Loading Report...</h1>");
    Loading.appendTo(LoadingDiv);
    LoadingDiv.appendTo($(element));
    // Get Report
    var HTMLContent = $("<div></div>").html(
    "<object width='650px' height='650px' data='../reports/ReportViewer.aspx?SurveyId="
    + contentItem.screen.SurveyId + "'/>"
    // Make report appear on top of the Loading message
    HTMLContent.css({
    "margin-top": "-50px"
    HTMLContent.appendTo($(element));
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • Problem with accessing parameter in HTML client, Access is not possible before created.

    I have one Screen in which I set a date.
    I pass the date to another Screen. In this screen I have a tile list showing all the busses and I want to show the current number of orders of the passed date for each bus.
    So I created a custom field in the tile for showing the amount of orders,  and it workes fine for a hardcoded date.
    But I have no access to the passed parameter, because it is to early.
    I get access after Screen.created to the Parameter, but there it is too late, because the list is already created with 0 as order Count.
    myapp.freieBusse.bkz1_render = function (element, contentItem) {
    var querybus = contentItem.value;
    // var querydatum = new Date(); <=== This works fine for today
    var querydatum = screen.queryDatumScreen; <== queryDatumScreen = Null at this Moment.
    myapp.activeDataWorkspace.wksqlData.QueryDispoByDatAndBus(querybus,querydatum).execute().then(function (results) {
    var countDispo = CountDispo(results);
    element.innerHTML = countDispo;
    function CountDispo(disposaetze) {
    var totalDisp = 0;
    var dispos = disposaetze.results;
    dispos.forEach(function (dispo) {
    totalDisp = totalDisp + 1;
    return totalDisp;
    How can I get an eralier Access to the Parameter. Or how can I manipulate the order Count of each row in the created of the Screen?
    Helmut

    The result is as slow that you can count the order with your fingers, but it works.
    If you use a
    WCF RIA Service the result will be fast. The calculations are performed inside SQL server and returned to the LightSwitch client in a single call per page.
    You can also use a Web API call but for a table of data it actually takes a lot of careful JavaScript code and you lose the drag and drop and strong typing in the HTML designer.
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • Finding Client Creation Date

    Hi Guys,
    I have created a client long time back and updated it many times.
    Now suddenly i want to know when i have created the client..the date and time of the client creation.
    I have tried to check this in T000 even ...but it's showing the last edited data only
    Can you help me pls...
    Thanks
    Rakesh

    Hello All,
    My problem go tsolved..and able to find the client creation date from SCC3.
    Thanks for all ,helping me to fix the issue .
    Best Regards
    Rakesh

  • DRM Web Client 500.19 issue on windows 2008(x64)  ERROR

    Hi,
    I installed DRM version 11.1.2 on windows server 2008(x64), according to the documents, I pre-installed .Net 3.5.1 and modified the applicationHost.conf file.
    I found this in epm_install_troubleshooting
    Web Client Access Failure
    Issue: After installing Data Relationship Management on Windows 2008 64-bit platform, you
    get this error message when attempting to access the Web client:
    HTTP Error 500.19 - Internal Server Error The requested page cannot be
    accessed because the related configuration data for the page is invalid.
    Solution: In the IIS configuration file (C:/Windows/System32/inetsrv/config/
    applicationHost.config), replace the two occurrences of Deny in the following section with
    Allow:
    <configuration>
    <configSections>
    <sectionGroup name="system.webServer">
    <section name="handlers" overrideModeDefault="Deny" />
    <name="modules" allowDefinition="MachineToApplication"
    overrideModeDefault="Deny" />
    However when I access the web client I got the 500.19 error, can't find C:\inetpub\wwwroot\drm-web-client\web.config, the web.config file do not exist.
    Config File \\?\C:\inetpub\wwwroot\drm-web-client\web.config

    Might be too late, but the problem is that IIS is pointing to the incorrect path. Should not be pointing to C:\Inetpub\wwwrooot\.... it should be pointing to Oracle\Middleware\EPMSystem11R1\products\DataRelationshipManagement\client\web-client same thing with the migration-client IIS app. To fix use the IIS Manager click the drm-web-client virtual directory and select "Advanced Settings" and update the "Physical Path" property.
    Pablo

Maybe you are looking for

  • Sap netweaver abap trial version installation error

    Hi all, I have windows 64 edition. i am trying to install sap netweaver 7.02 abap trial version 64 bit.But it gives folowing error An error occurred while processing option SAP NetWeaver 7.0 including Enhancement Package 2 > SAP Application Server AB

  • Acrobat spontaneously tries to do OCR

    Whenever I open a pdf document, Adobe Acrobat Standard 9.5.0 tries to do an OCR on it (without my asking for it) - even on pdf documents that have already been OCR'ed.  And then, usually, it will try to do it again and again.  How do I disable this s

  • Organizing pages using sub-folders?

    Hi, I suspect that this might be a common question, but was unable to find it in previous posts. Anyway, what I'd like to do is to arrange the pages within in my site by creating folders. At the moment, I have a rapidly growing number of pages in my

  • CC Not Showing All of My Apps AND CC Does Not Work Offline

    First of all, CC shows in my menu bar (on my MBP) but it says I only have PS and Bridge. I am signed up via the 'photography program' so both PS and LR should show on the list -- but they don't. I THINK both apps are updating but I am unsure of that.

  • Exception in Tomcat 4.1

    Getting the following exception in Tomcat 4.1 I know, there's something to be done with servlet-api.jar or jsp-api.jar. Kindly help me out. This exception is driving me crazy out here. javax.servlet.ServletException: javax.servlet.jsp.tagext.TagAttri