cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Entity is missing on CDS - Current Environment

Hi,

 

I am working on a Canvas App (Microsoft Dynamics 365 CE as its common data service) and I'm facing an issue right now. One custom entity is missing in the list of entities under the Current Environment. I used the 'change environment' option and point it to the same environment with the current environment and the custom entity I'm looking for appears. However, since there are now two source of data, the codes are breaking.

 

Kindly advise.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Entity is missing on CDS - Current Environment

Hi @pdcmagno ,

 

I am not sure why the custom entity doesn't appear in the Current environment, I can not reproduce this issue yet.

However, the solution I provide above should help to work around this issue, replace all entities with the ones in actual environment.

First to delete all entities in current environment, then switch to the actual environment and add these entities back. If the entity names are the same as before, the code should not crash.

Sik

View solution in original post

5 REPLIES 5
Highlighted
Community Support
Community Support

Re: Entity is missing on CDS - Current Environment

Hi @pdcmagno ,

I made a test, and found that changing the current environment to the same environment doesn't break your code if the Connection Names(Entity Name) are kept the same.

If you add a new entity first and then delete the old one, the new entity name will have an additional suffix "_1", and the names of the two entities are not the same, which will cause the code to crash.

Snipaste_2020-06-03_16-33-22.png

You need to delete the old entity first and then add a new entity, which will leave the entity name unchanged, and the code can still work as before.

Hope this helps.

Sik

Highlighted
Frequent Visitor

Re: Entity is missing on CDS - Current Environment

Hi Sik,

 

Actually the main issue is the missing custom entity in the Current Environment. I only use the Change Environment because I couldn't see the entity under the Current Environment.

Highlighted
Community Support
Community Support

Re: Entity is missing on CDS - Current Environment

Hi @pdcmagno 

 

OK, I though you want to handle the code break issue.

What is the kind of Custom entity? could you share some screenshots to show the issue?

Sik

Highlighted
Frequent Visitor

Re: Entity is missing on CDS - Current Environment

Hi Sik,

 

Please see below image. The Contact entity exists in the "Current Environment" and the actual environment. However the Customer Goals entity (custom entity) are not listed in the "Current Environment". Please take note that the Actual Environment is same with the Current Environment. I'm using a Patch function in my code to assign a value in the Customer Goal Lookup. It is okay and works on first try but when I reopened the app, code breaks asking for a different schema.

 

Error.png

 
 
Highlighted
Community Support
Community Support

Re: Entity is missing on CDS - Current Environment

Hi @pdcmagno ,

 

I am not sure why the custom entity doesn't appear in the Current environment, I can not reproduce this issue yet.

However, the solution I provide above should help to work around this issue, replace all entities with the ones in actual environment.

First to delete all entities in current environment, then switch to the actual environment and add these entities back. If the entity names are the same as before, the code should not crash.

Sik

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (6,206)