Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Customize Dynamics 365 Portal

Posted on by

Hi All,

Can someone please tell me if the Javascript code implemented in the CRM on the same entity will work in the dynamics 365 Portal?

I need to concatenate First name + Last name as Full Name.

It is not working from my end. Can you suggest any solution?

Thanks

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Customize Dynamics 365 Portal

    Good idea, Andreas. Will look into the links you shared. Thanks.

  • Suggested answer
    RE: Customize Dynamics 365 Portal

    Hi Rakhi,

    Can you please try below code:

    function concatfield_onload()

    {

    var fName = Xrm.Page.getAttribute("firstname").getValue();

    var lName= Xrm.Page.getAttribute("lastname").getValue();

    Xrm.Page.getAttribute("fullname").setValue(fName + lName);

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

    }

  • Suggested answer
    RE: Customize Dynamics 365 Portal

    Hi,

    JavaScript on the CRM side will not work in Portal. If you want to display Full name then you can make use of "Full Name" Field which does not require any java script.

    If you still want to concatenate First Name and Last name then, you can make use of Liquid Template or Java script to concatenate both the field and display in your entity form.

    Mark as Answered if it helps You

  • Suggested answer
    Andreas Cieslik Profile Picture
    Andreas Cieslik 9,265 on at
    RE: Customize Dynamics 365 Portal

    Why dont you add the fullname field if using e.g. the contact form?

    Otherwise this could give you a hint:

    nishantrana.me/.../using-custom-javascript-field-on-entity-form-to-add-javascript-in-portal-in-dynamics-365

    and this one JScript syntax:

    rajeevpentyala.com/.../useful-jscript-syntaxes-adx-portal

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans