Skip to main content

Posts

Showing posts with the label D365 portal

D365 portal KB article details customize comment section.

The comment is a set of Microsoft control. If you want to make it customized like width height or change post comment button content you can use CSS and javascript. Goto localized content and in Advance add your javascript or CSS file.

D365 portal payone payment integration

 Recently i implement PAYONE payment using C# https://docs.payone.com/display/public/PLATFORM/PAYONE+Link+-+API I also work with other payment gateway like stripe. During develop this PAYONE solution for portal i realize myself this is no 1 according to their security. PAYONE is a very complex system but i like their sytem. PAYONE works like this steps: 1. Create link Request 2. Notify URL 3. Transaction status 4. Payment cancel request. soon i will try to share some code.  

Add additional text into D365 portal label

 If we want to add additional label value to the D365 portal we can use this approach $(document).ready(function (){ var currentLabel = $("label#std_data_storage_confirmation_label").html(); var labelWithDatenSchutzLink = currentLabel + " <a href='https://www.fedalic.de/' class='fedalic-blue' target='_blank' >Datenschutz</a>"; $("label#std_data_storage_confirmation_label").html(labelWithDatenSchutzLink); }); 65 

Rich Text Field are showing in plain text with html tags in Dynamics 365 Portals

 In my D365 form, I have some fields that contains HTML tags. like link. When I show this form into the portal I can see the tag. which is not expecting.  i use the following javascript $(document).ready(function(){ // Set the value into tem variable var std_footer_presave = $('#std_footer').val(); //Remove HTML tag $("#std_footer").parent().append("<span class='text'>" + $("#std_footer").val()+ "</span>"); $("#std_footer").remove(); // Form validation for next button or save button window.webFormClientValidate = function () { // Create hidden field $('#std_footer').val(''); $('#std_footer').hide(); $('<input>', { type: 'hidden', id: 'std_footer', name: 'std_footer', value: '' }).appendTo('form'); // Set value into hidden field $('...

d365 portal How can I redirect to login page if not logged in

 Go to your form select Authentication Required Yes. In my case, I was using the Advance form.

d365 portal set browser tab title

 d365 portal browser tab title is the combination of 2 titles.  If you want to set the title portal for  every page like: Student Portal Class Portal  then you need to set the value into Browser Title Suffix If you do not want to use this text just remove it. For each page, title Go to your web page-> localized content->select the content page->change the title.

d365 portal form field set as hidden field.

 If you want to use the form field as a hidden field into the form you can use this. $(document).ready(function(){ $('#std_name').val(''); $('#std_name_label').hide(); $('#std_name').hide(); $('<input>', { type: 'hidden', id: 'std_name', name: 'std_name', value: '' }).appendTo('form'); }); At any event, you can set the value that will behave life form field. 

D365 portal get date field value into java script

 If you want to date field value into custom java script. You can use this script. $(document).ready(function(){ var CurrentDate = new Date(); var stdregistrationclosedatetime = $("#stdregistrationclosedatetime").datepicker({ dateFormat: 'dd,MM,yyyy' }).val(); var registrationclosedatetime = new Date(stdregistrationclosedatetime) if(CurrentDate>registrationclosedatetime){ $("#UpdateButton").hide(); } });

D365 portal Custom Javascript is not working into Profile web page

I am trying to add custom JavaScript into Profile web page but it is not working. I also try to switch content page but that is also not working, it shows disable. Solution: Click related and web page. select web page and add your script.

D365 portal Error: Incorrect contents fetched, please reload

 The error is coming from your custom java script when you click submit button. I my case i was using webFormClientValidate but forgot to return true because it always expect return true if not false. window.webFormClientValidate = function () { // your validation logic return true; }; For your case please check your custom java script code and find out that you miss anything to return or not.

D365 portal currency field formatting

D365 portal is not able to format the currency field. It shows like that I also try to use mask but that is not solve my problem. https://oliverrodrigues365.com/2020/04/15/power-apps-portals-adding-field-mask/ I use the following java script. $(document).ready(function(){ // Hide default currency icon from this form $("span."+"input-group-addon").hide(); // Set currency icon var std_classfee_onload = parseFloat($('#std_classfee').val()); $('#std_classfee').val(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(parseFloat(std_classfee_onload))); // Form validation for next button or save button click window.webFormClientValidate = function () { // Presave remove currency icon var std_classfee_presave = parseFloat($('#std_classfee').val()); $('#std_classfee').val(std_classfee_presave); ...

D365 portal date field formatting

 In portal the CRM form date field is not showing in to the right format. it shows like this. If you want to format this date field you can use this script. function setDateTimeFieldValue(fieldId, dateValue) { //Get the submit field var $submitField = $("#" + fieldId); //Get the display field var $displayField = $submitField.nextAll(".datetimepicker").children("input"); //Get the display date format var dateFormat = $displayField.attr("data-date-format"); //Set the submit field. Remember this needs to be in UTC and the format must be exact. $submitField.val(moment.utc(dateValue).format("YYYY-MM-DDTHH:mm:ss.SSSSSSS")); //Set the display field using the page's date format $displayField.val(moment(dateValue).format(dateFormat)); } Call this function with field name and value var std__eventstartdatetime = setDateTimeFieldValue('std__eventstartdatetime',data.value[0].s...

D365 portal hide Azure AD login button

 Open theme.css of your portal. add this line at the end of the file. .btn-line { visibility: hidden; } Go to your portal management and into site settings set Authentication/Registration/ExternalLoginEnabled False. Now your portal login window will look like this.

D365 portal form validation script with other script

 In your portal form you have form script which is based on your form input. If you also want add form validation in to same script you can use this sample code. $(document).ready(function(){ // Write your other form script code // Client validation this will trigger during submit or next button for advance form window.webFormClientValidate = function () { // write your client validation logic var assistenstd = parseFloat($('#proevt_assistenstd_discount').val()) var filePath = $('#AttachFile').val(); if(assistenstd>0){ if(filePath){ return true; } else { // Validation error alert("Please upload document."); return false; } } }; });

D365 portal please wait bar with animation

 if you want to use please wait with animation in your portal in any event you can use this  this jquery will work with the default bootstrap of the portal.  // Please wait function showPleaseWait() { if (document.querySelector("#pleaseWaitDialog") == null) { var modalLoading = '<div class="modal" id="pleaseWaitDialog" data-backdrop="static" data-keyboard="false" role="dialog">\ <div class="modal-dialog">\ <div class="modal-content">\ <div class="modal-header">\ <h4 class="modal-title">Bitte warten...</h4>\ </div>\ <div class="modal-body">\ <div class="progress">\ <div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar"\ ...

D365 portal checkbox enable / disable

Checkbox is special input type into javascript. You can try the following for checkbox enable / disable //Disable $("#std__assistenzarzt").attr('disabled', 'disabled'); $("#std__assistenzarzt").attr("readonly", "readonly"); //Enable $("#std__assistenzarzt").removeAttr('disabled'); $("#std__assistenzarzt").removeAttr('readonly');

D365 portal advance form get the previous step data in the current step

 Using localStorage in javascript we can easily get the previous step data in the current step. // Set value into previous step window.localStorage.setItem('studentregistrationadvancestudentGuid', studentGuid); // Get value into next step var requeststudentId = window.localStorage.getItem('studentregistrationadvancestudentGuid');