Showing posts with label AdxStudio. Show all posts
Showing posts with label AdxStudio. Show all posts

Implementing the Clickable Progress Bar in Web form in CrmPortals/PowerApps Portals

Summary : Implementing the Clickable Progress Bar in Web form in CrmPortals.

copy the following code and paste in the Javascript field in web page which is your webform associated


Code:

// JavaScript source code

$(document).ready(function () {
    applicationNavigationForm();
});


function applicationNavigationForm() {
    var i = 1;
    $("#WebFormControl_ProgressIndicator ol.progress li").each(function () {
        var content = this.innerHTML
        if (!$(this).hasClass('active')) {
            var link = $('<a>').attr({
                href: '#',
                title: content,
                onclick: 'someFunction(this)',
                id: i
            }).html(content);

            this.innerHTML = "";
            $(this).append(link);
        }
        else if ($(this).hasClass('active')) {
            var link = $('<div>').attr({
                title: content,
                id: i
            }).html(content);
            this.innerHTML = "";
            $(this).append(link);
            localStorage.setItem("CurrentStage", i);
            $("#WebFormControl_ProgressIndicator ol.progress li a").removeAttr("href");
            $("#WebFormControl_ProgressIndicator ol.progress li a").unbind("click");
        }
        i++;
        var stepName = content;

        if (stepName != undefined) {
            stepName = stepName.replace('<span class="glyphicon glyphicon-ok"></span>', '');
        }

    });

    if (localStorage.getItem("ClickedStage") != undefined && localStorage.getItem("CurrentStage") != undefined) {

        if (parseInt(localStorage.getItem("ClickedStage")) == parseInt(localStorage.getItem("CurrentStage"))) {
            localStorage.setItem("ClickedStage", null);
            localStorage.setItem("CurrentStage", null);
        }
        else if (parseInt(localStorage.getItem("ClickedStage")) < parseInt(localStorage.getItem("CurrentStage"))) {
            $('#PreviousButton').click();
        }
        else if (parseInt(localStorage.getItem("ClickedStage")) > parseInt(localStorage.getItem("CurrentStage"))) {
            $('#NextButton').click();
        }
    }

}

function someFunction(obj) {

    localStorage.setItem("ClickedStage", $(obj).attr('id'));
    localStorage.setItem("CurrentStage", $("#WebFormControl_ProgressIndicator ol.progress li div").attr('id'));
    var nextButton = $('#NextButton');
    if ($("#NextButton").is(":disabled")) {
        $('#PreviousButton').click();
    }
    else if ($(obj).parent().hasClass('text-muted list-group-item-success')) {
        $('#PreviousButton').click();
    }
    else if ($(obj).parent().hasClass('incomplete')) {
        nextButton.click();
    }

}

How to Validate Text fields allow only Numbers Dynamics 365 Portals.

Summary: How to Validate Text fields allow only Numbers Dynamics 365 Portals.

$(document).ready(function(){
$("#name").
keyup(function(event) {
if (
event.keyCode == 46 || event.keyCode == 8 ) {
// let it happen, don't do anything
} else if (/\D/
g.test(this.value)) {
// Filter non-digits from input value.
this.value = this.value.replace(/\D/g, '');
alert("Enter only Numbers");
}
});

});

How to Develop Sticky Footer in Microsoft Dynamics 365 CRM Portals.


Summary : How to make the Sticky Footer in Microsoft Dynamics 365 CRM Portals.



1. Navigate to Portals Tab---> Webtemplates

2. Open the Footer webtemplate and search for the following line of code

<footer role="contentinfo">

3. Replace the above line with following code.

<footer role="contentinfo" style="position:fixed;left:0;bottom:0;width:100%;">








How to Disable / Enable the Fields, Buttons and DateTime Fields with Common Code. In Dynamics 365 CRM Portals.

Summary : How to Disable / Enable the Fields, Buttons and DateTime Fields In Dynamics 365 CRM Portals.

Common Code:

function TextFieldsdisableEnable(fields, flag) {
    if (fields !== "") {
        var fieldschema = fields.split(",");
        for (var item = 0; item < fieldschema.length; item++) {
            if (fieldschema !== "" && $("#" + fieldschema[item]) !== null) {
                $("#" + fieldschema[item]).prop('disabled', flag);
            }
        }
    }
}

function DatetimeFieldsdisableEnable(fields, flag) {
    if (fields !== "") {
        var fieldschema = fields.split(",");
        for (var item = 0; item < fieldschema.length; item++) {
            if (fieldschema !== "" && $("#" + fieldschema[item]) !== null) {
                if (flag) {
                    var dateField = $("#" + fieldschema[item]);
                    // Get ‘Text’ field of Date Control
                    var displayField = dateField.nextAll(".datetimepicker").children("input");
                    // Get ‘Calendar’ Icon of Date Control
                    var dateIcon = dateField.nextAll(".datetimepicker").children("span");
                    // Make ‘Text’ field of Date Control Read-Only
                    displayField.attr("readonly", "readonly");
                    // Hide ‘Calendar’ Icon
                    dateIcon.css("display", "none");
                }
                else {
                    var dateField = $("#" + fieldschema[item]);
                    // Get ‘Text’ field of Date Control
                    var displayField = dateField.nextAll(".datetimepicker").children("input");
                    // Get ‘Calendar’ Icon of Date Control
                    var dateIcon = dateField.nextAll(".datetimepicker").children("span");
                    // Make ‘Text’ field of Date Control Read-Only
                    //displayField.attr("enabled", "enabled");
                    displayField.removeAttr("readonly");
                    // Hide ‘Calendar’ Icon
                    dateIcon.css("display", "");
                }
            }
        }
    }
}

How to Use Example:

// the first parameter is list of fields/button id's which you want to disable and second parameter pass true/false , true for disable and false for enable.

TextFieldsdisableEnable("portal_test,portal_tetsoptionset,edittBtn", true);

DatetimeFieldsdisableEnable("portal_testdate", true);



How to Create Custom Button in CRM Portals EntityForm or WebForm

Summary :  How to Create Custom Button in CRM Portals EntityForm or WebForm


Code:

$(document).ready(function () {
    var editbtn = $('<input/>').attr({ type: 'button', name: 'Edit', value: 'Edit', id: 'edittBtn', class: 'submit-btn btn btn-primary' });

// InsertButton is for the  Create Form, if you want for update form use the UpdateButton

    $("#InsertButton").after(editbtn);
    $("#edittBtn").click(function () {
       // Implement the button click logic.
    });
});




How to auto populate the Customer/Account field from current login user's customer in Dynamics 365 Portals

Summary : How to auto populate the Customer/Account field from current login user's customer in Dynamics 365 Portals

Open your EntityForm or WebForm Step and place the following code on advanced JavaScript field.

Code:

$(document).ready(function () {

    {% if user %}
        $("#customerid").val('{{user.parentcustomerid.id}}');
        $("#customerid_name").val('{{user.parentcustomerid.name}}');
        $("#customerid_entityname").val("account");
        
    {% endif %}
});

In the above code replace customerid field with your field schema name and {{user.parentcustomerid.id}} replace with you field name of user entity.
ex: {{user.yourfieldname.id}}




How to develop a daily/schedule Jobs for Dynamics 365

Subject: How to develop a daily/schedule Jobs for Dynamics 365

v  We have a couple ways to develop the scheduler jobs. The following approaches are most commonly used.
    
        1. Console Application (C#) and Scheduling.
        2. Scribe packages and Scheduling.
        2. SSIS Packages and Scheduling.
v One of the major parameter for deciding the approach is volume of the data needs to be updated/created.
              If you need to perform operation for less than 10k then we will be able to manage with Console App.
              If volume of the data is greater than 10k then we need to go with SSIS or Scribe jobs.

Step by step process to develop the Console Application for Dynamics 365.          
             
Common Scenarios :
1.Sending the mails to remainder mails from CRM for Approval or pending action for any entity.
2.Retrieving data from other data source and Create/Updating in Dynamics 365.
3.Perform the some calculations and updating the CRM.
Coding:

I will develop a simple console application here and show the step by step.



Dynamics 365 CRM Portals - Supported Features in Customer Self- Serve portal, Partner Portal,Employee Self- Service Portal,Community Portal and Custom Portal

Subject: Dynamics 365 CRM Portals - Supported Features between the Portals

Most of the people getting confused when configuring the CRM Portals. which type of the portal should take.

In D365 Portals, we have 5 types of websites.

1. Customer Self- Serve portal
2. Partner Portal
3.Employee Self- Service Portal
4. Community Portal
5. Custom Portal

Here I listed the Features difference among these five websites

Features
Customer Self-Service Portal
Partner Portal
Employee Self-Service Portal
Community Portal
Custom Portal
World Ready
Yes
Yes
Yes
Yes
Yes
Multi-Language Support
Yes
Yes
Yes
Yes
Yes
Portal Administration
Yes
Yes
Yes
Yes
Yes
Customization and Extensibility
Yes
Yes
Yes
Yes
Yes
Theming
Yes
Yes
Yes
Yes
Yes
Content Management
Yes

Yes
Yes

Knowledge Management
Yes
Yes
Yes
Yes

Support/Case Management
Yes

Yes
Yes

Forums
Yes

Yes
Yes

Faceted Search
Yes

Yes


Profile Management
Yes

Yes


Subscribe to Forum Thread
Yes

Yes


Comments
Yes

Yes
Yes

Azure AD Authentication


Yes


Ideas



Yes

Blogs



Yes

Project Service Automation Integration

Yes



Field Service Integration

Yes



Partner On boarding

Yes



Portal Base
Yes
Yes
Yes
Yes
Yes
Portal Workflows
Yes
Yes
Yes
Yes
Yes
Web Notifications
Yes
Yes
Yes
Yes
Yes
Microsoft Identity
Yes
Yes
Yes
Yes
Yes
Identity Workflows
Yes
Yes
Yes
Yes
Yes
Web Forms
Yes
Yes
Yes
Yes
Yes
Feedback
Yes
Yes
Yes
Yes
Yes

Popular Posts