web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Disappearing information onload

(0) ShareShare
ReportReport
Posted on by 155

I have a datetime field on the entity invoice that it automatically filled with JavaScript onload function.

I can see the date for one seconded then it is gone.

I have commented out the remaining JavaScript so it is not being deleted by JavaScript.

I have disabled all the processes on the entity invoice.

No System jobs ran.

There are no plug-in trace logs.

How can I find what is altering my field?

I have the same question (0)
  • Charan Raju C R Profile Picture
    7 Moderator on at
    RE: Disappearing information onload

    Disable your onload function and open an invoice record which has value for this date and time field. Check if the field value is still getting cleared. If so, there must be some JS code or business rule triggering to clear this field value. If not, you need to review your onload JS code.

  • Gansea Profile Picture
    155 on at
    RE: Disappearing information onload

    Hi Pavan,

    I have tried with different browsers, different users and in InPrivate with the same error.

  • pavanmanideep Profile Picture
    1,331 on at
    RE: Disappearing information onload

    Hi Gansea,

    Just try to isolate your issue, is this issue occurring only for you, did u check in your team mates machine by any chance.

    I believe this might be related to cache in your browser, try to use InPrivate window and see....as you dont have any other customizations and logic running on this field.

    https://dynamicconsulting.com/2019/11/02/how-to-clear-your-cache/

    Hope this helps..

    Cheers,

    PMDY

  • Gansea Profile Picture
    155 on at
    RE: Disappearing information onload

    Hi Charan

    1. Yes, it is a custom date and time field?

    2. No, there isn't any other javascript function overwriting my value

    3. I have disable all the javascript events registered on this form and it still isn't working

    4. var now = new Date();

    Xrm.Page.getAttribute("test_invoicedate").setValue(now);

    Xrm.Page.getAttribute("test_invoicedate").setSubmitMode("always");

    var date = Xrm.Page.data.entity.attributes.get("test_invoicedate");

    console.log(date);

    The console log shows the correct date, but at somepoint later it is overwritten.

    console.log(date); is the last line of code in the invoice onload javascript

  • Charan Raju C R Profile Picture
    7 Moderator on at
    RE: Disappearing information onload

    1. Is this is custom date and time field?

    2. Check if there is any other javascript function overwriting your value

    3. Disable all the javascript events registered on this form and check if that is working

    4. Please share your javascript code here which sets the date and time field value

  • Gansea Profile Picture
    155 on at
    RE: Disappearing information onload

    Hi Manoj Mane,

    The processes and Business Rules are disabled.

    I cannot disable the JavaScript onload form because it is the JavaScript onload form that populates the DateTime field.

    I have disabled all the other JavaScript code in the old load form.

    I still have the same problem that the date time disappears one second after it is created / displayed

    Any other ideas?

  • Manoj Mane Profile Picture
    1,020 on at
    RE: Disappearing information onload

    Hi Gansea,

    Can you please the field dependency and cross verify that there are no active Process/Business Rule or any Power Automate is there.

    Also, Can you disable the JavaScript on Load of a form for the debugging purpose.

    Thanks,
    Manoj Mane.

    Please mark this as VERIFIED if it helps. image

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 170

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 116 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans