Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Store null against a key or remove Return Key from USD Data Parameters - MS USD

Posted on by 295

Hi All,

My question is related to USD Data parameters and Return parameters in particular.

As we already know, whenever a function is fired and the returned value is stored inside Return Data parameters inside USD.

I have a scenario where a loop is working and it fires a dynamic function and stores value against it inside my return parameters.

Now, lets assume my dynamic function as per the loop will be fired twice and it is picking up some value from the page and storing it in return parameter (which will be used for future). So for example in my first iteration , firstname is picked from the page and stored in return parameter as abc. perfect till here. But, lets assume when my second iteration happens and it searches for lastname in the page and lastname is null or empty, then in my return it should update the return parameter as null (which has previously my firstname) but instead it is not making it null. It is keeping the last returned value whereas i want to update it with whatever value is being return.

Is there any possible way to do it? How can I clean my return parameter or make it null everytime a null or empty string is returned?

  • Faran Saleem Profile Picture
    Faran Saleem 295 on at
    RE: Store null against a key or remove Return Key from USD Data Parameters - MS USD

    Oh i get it.. So this falls under one limitation which I hope Microsoft finds a way to fix since it will be a useful feature to have.

    So, currently I will have to do some custom coding and as you said in case if it is "null" then I will have to assume in my JS it as null.

    Anyways, thanks a ton for your help. I am marking yours as an verified answer.

  • Verified answer
    thonda Profile Picture
    thonda on at
    RE: Store null against a key or remove Return Key from USD Data Parameters - MS USD

    Hi Farhan,

    docs.microsoft.com/.../replacement-parameters

    As per the documentation [[$Return.ActionCallName]] is expecting string value as return parameter, which proves your observation as well.

    Hence you have to achieve your requirement under this limitation, if not empty try with "null" or "0"  string value.

    Praveen T

    D365 Customization Support

    Microsoft Corporation

  • Faran Saleem Profile Picture
    Faran Saleem 295 on at
    RE: Store null against a key or remove Return Key from USD Data Parameters - MS USD

    This would mean I need to pass "empty" in case my control returns a null value?

    Isn't there a better approach where I can store null value somehow?

  • Suggested answer
    thonda Profile Picture
    thonda on at
    RE: Store null against a key or remove Return Key from USD Data Parameters - MS USD

    Can you try using literal 'empty' to represent empty string or null value. This mostly appears as a design limitation

    Praveen T

    Regards,

    D365 Customization Support.

    Microsoft Corporation

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,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans