Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Need to add liquid template for rendering the button which is set in entity form

Posted on by 340

Need to add liquid template for rendering the button which is set in entity form through web template i am not able to render the button which i have set in entity form. So, please help me out 

*This post is locked for comments

  • Verified answer
    Alok Sharma Profile Picture
    Alok Sharma 340 on at
    RE: Need to add liquid template for rendering the button which is set in entity form

    It can be possible while redirecting a web page of on successful display field in entity form.

  • Suggested answer
    Andreas Cieslik Profile Picture
    Andreas Cieslik 9,265 on at
    RE: Need to add liquid template for rendering the button which is set in entity form

    this reference is showing that CRM form scripting is not working in Portal rendering:

    community.adxstudio.com/.../crm-entity-form-feature-matrix

    On the Entity form there is a Custom JavaScript field where you can put in your own modification via jQuery:

    community.adxstudio.com/.../custom-javascript

    with a bit of trial and error you should be able to get the web resource control and create the required button via jQuery.

  • Verified answer
    joman Profile Picture
    joman 617 on at
    RE: Need to add liquid template for rendering the button which is set in entity form

    i've done this by JS.

    1. I created an empty(1x1px) picture.

    2. I made a web-resource on a form and chose this picture.

    3. On needed event (on form load for example) i place js witch call function:

    function toButton(text, WebResource, width, eventName) {
            var ctrl = Xrm.Page.getControl(WebResource).getObject();
            if (ctrl) {
                var Btn = document.createElement("input");
                Btn.type = "button";
                Btn.value = text;
                Btn.style.width = width;
                Btn.addEventListener('click', eventName);
                ctrl.parentNode.replaceChild(Btn, ctrl);
            }
        }

    You can modify it to make any style of button.

  • Andreas Cieslik Profile Picture
    Andreas Cieslik 9,265 on at
    RE: Need to add liquid template for rendering the button which is set in entity form

    Can you show us the liquid part of your entity form where you defined the button?

  • Alok Sharma Profile Picture
    Alok Sharma 340 on at
    RE: Need to add liquid template for rendering the button which is set in entity form

    Yes but after adding style sheet of header and footer.....

  • joman Profile Picture
    joman 617 on at
    RE: Need to add liquid template for rendering the button which is set in entity form

    Button on a form?

    Do you need something like this:

    8738.12.png

    ??

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,104 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans