Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Conditional step not working D365 Portal

Posted on by 435

Hi,

In a web form we have 3 steps , ST1 , ST2, ST3 .

After Step ST1 its optional to fill ST2 and After ST2 step ST3 will be shown up.

Requirement - I have to make ST2 mandatory .

So I open Step 2 and set - Type - condition

In Condition Tab - I set the condition new_quantity but its saying - "attribute not found"


ST1 is linked with entity E1

ST2 is linked with entity E2

I checked the schema name of field in Entity E2 it was correct

Can any one help me

  • Suggested answer
    windyMill Profile Picture
    windyMill 435 on at
    RE: Conditional step not working D365 Portal

    Before moving to Step ST3 i am checking the fields in ST2 is

    The below code is written in step 2

    if (window.jQuery) {

     (function ($) {

        if (typeof (webFormClientValidate) != 'undefined') {

           var originalValidationFunction = webFormClientValidate;

           if (originalValidationFunction && typeof (originalValidationFunction) == "function") {

              webFormClientValidate = function() {

                 originalValidationFunction.apply(this, arguments);

                 // do your custom validation here

                  check if data is present in Entity2 by calling webapi  

                 // return false; //  if  no data present

                 return true; //if  data present

              };

           }

        }

  • windyMill Profile Picture
    windyMill 435 on at
    RE: Conditional step not working D365 Portal

    yes Pranjali this fix now .

    check the below link

    docs.microsoft.com/.../add-custom-javascript

    if (window.jQuery) {

      (function ($) {

         if (typeof (webFormClientValidate) != 'undefined') {

            var originalValidationFunction = webFormClientValidate;

            if (originalValidationFunction && typeof (originalValidationFunction) == "function") {

               webFormClientValidate = function() {

                  originalValidationFunction.apply(this, arguments);

                  // do your custom validation here

                  // return false; // to prevent the form submit you need to return false

                  // end custom validation.

                  return true;

               };

            }

         }

      }(window.jQuery));

    }

  • Suggested answer
    RE: Conditional step not working D365 Portal

    Hello Windy,

    If you have managed to fix this, kindly share it here for others.

    If this is still an issue, I'd recommend opening a support request with Microsoft.

    Cheers!

    Pranjali

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