Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Query to update the value in other table.

(0) ShareShare
ReportReport
Posted on by 10
I have create extension of Inventtrans and add new field as enum type with value of No Yes Name Updatestatus.
 
When I check the inventtransTable through table browser  this field is visible.
When I apply this query on this field my query did not work.
while select inventTrans
          where 
            //inventTrans.Updatestatus ==0
            InventTrans.DatePhysical!=Global::dateNull()
After commending this line my query work for me.


When I run the debugger in last step I have to update the inventtrans.updatestatus field with Yes value.
 

This field is not visible in debugging window.
 
Guys Need your help in this regard
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    Query to update the value in other table.
    Also have you added enum values for your new custom field? Also here new enum is not required you can use NoYes enum for the table field.
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    Query to update the value in other table.
    As you are able to see new field in table browser means it is synchronised successfully. But it doesn't have any value. So can you give a select statement for this field in ssms and check what value it is returning. 
     
    Also check if the enum values exist for the new enum you created. I mean, check those enum values  in ssms.
  • Community member Profile Picture
    Community member 10 on at
    Query to update the value in other table.
    Hello Andre 
     
    Thank you very much for your response.  I have also tried with NoYes value as well like below query but failed
     
    while select inventTrans
              where 
                //inventTrans.Updatestatus ==Updatestatus::No
                InventTrans.DatePhysical!=Global::dateNull()
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,971 Super User 2025 Season 1 on at
    Query to update the value in other table.
    Hi,
     
    In addition to the reply from Martin, I noticed that you tried to set a range on the UpdateStatus field with a hard-coded value '0'. Have you tried using UpdateStatus::No or UpdateStatus::Yes? Depending how the new enum is created, the value 0 might not be used or used for another value.
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,846 Most Valuable Professional on at
    Query to update the value in other table.
    I assume that your statement " my query did not work" means that your query didn't return any data. But it doesn't mean that the query doesn't work, just that there are no records (in the current company) meeting all the conditions.
     
    Regarding debugger, you didn't describe your problem in detail, but I think you aren't looking at the Extensions node. You think the new field will be at the same level as standard fields, but it isn§t the case.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,971 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,846 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans