Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

get enum value that is not bounded to data source in RDP class

Posted on by 570

hello ..

i created new parm noYes in a contract class 

i need when this enum value is cheked some records will delete from tmp table

so i wrote next code after data inserted in tmp table

    parmNoYes = dataContract.parmSimiProduct();

    if (parmNoYes == NoYes::Yes)
    {
        
        delete_from t_PtodTotalTMP where 
         t_PtodTotalTMP.ItemId  == "1101020";
       
    }


but nothing deleted from tmp table even checked or not

so i change the code 

    if (parmNoYes == NoYes::No)
    {
        
        delete_from t_PtodTotalTMP where 
         t_PtodTotalTMP.ItemId  == "1101020";
       
    }


here the record 1101020 is deleted even checked or not

any help

thank you in advance ..

1101020

*This post is locked for comments

  • Verified answer
    Ismail Mohamed Profile Picture
    Ismail Mohamed 570 on at
    RE: get enum value that is not bounded to data source in RDP class
        if (dataContract.parmSimiProduct()== NoYes::Yes)
        {    
            delete_from t_PtodTotalTMP where 
             t_PtodTotalTMP.ItemId  == "1101020";
           
        }
  • Suggested answer
    startax Profile Picture
    startax 1,845 on at
    RE: get enum value that is not bounded to data source in RDP class

    Hi,

    Check parmNoYes = dataContract.parmSimiProduct() what is returning this method when you call this method.

    By default NoYes return 0 for case no if checkbox is unchecked. That's the reason your second condition is working. 

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