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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Javascript en formulario de Dynamics

(0) ShareShare
ReportReport
Posted on by 10

Buenas,

Quisiera pedir ayuda con esto, necesito a traves de Java Script a partir de la Fecha de Nacimiento de un contacto ejemplo: 12/01/1996, que en otro campo llamado proximo cumpleaños me coloque la misma fecha pero de este año.

No he logrado hasta el momento, la finalidad de esto es enviar un recordatorio de cumpleaños por cada contacto.

El codigo es el siguiente:


    var cumpleanhos =  Xrm.Page.getAttribute("new_fechadenacimiento").getValue();

    if (cumpleanhos == null)

    {

     Xrm.Page.getAttribute("new_prximocumpleaos").SetValue('null');

    return;

    }

    var f = new Date();

    f.setHours(0);

    f.setMinutes(0);

    f.setSeconds(0);

    cumpleanhos.setFullYear(f.getFullYear());

    Xrm.Page.getAttribute("new_prximocumpleaos").setValue('cumpleanhos');

Si alguien me puede ayudar,

Muchas gracias

Categories:
I have the same question (0)
  • Suggested answer
    Derek Albaugh Profile Picture
    on at

    No pude encontrar mucho, si acaso, con respecto a Javascript y Dynamics GP, pero es posible que los miembros de la Comunidad tengan alguna información.

    Lo más cerca que pude encontrar incluso mencionando Javascript y GP fue otra pregunta de foros en 2013 buscando conectarse a Dynamics GP usando Java para extraer/actualizar información y la respuesta en ese momento fue que no había una manera específica de obtener los datos usando Java y las recomendaciones mencionadas eran todas más para exportar datos y no tanto actualizar nada, como usted mencionó que está buscando tomar el DOB de un contacto y ponerlo en otro campo llamado 'Próximo Cumpleaños', reemplazando el año pero usando el mismo mes y día del DOB.

    Esperemos que alguien en la Comunidad tenga más información que pueda agregar. Gracias.

    I wasn't able to find much, if anything, regarding Javascript and Dynamics GP, but it's possible the Community members may have some information.

    Closest I could find even mentioning Javascript and GP was another forums question back in 2013 looking to connect to Dynamics GP using Java to pull/update information and the response at that time was that there wasn't a specific way to get the data using Java and the recommendations mentioned were all more for exporting data and not so much updating anything, like you mentioned you are looking to take the DOB of a contact and put it in another field called 'Next Birthday', replacing the year but using the same month and day of the DOB.

    Hopefully someone in the Community has some more information they can add. Thank you.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans