Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Code working in Dev enviornment but not in Production and Sandbox

(0) ShareShare
ReportReport
Posted on by 15

Hi everyone,

I have created a form and added some checkboxes in the d365fo dev environment and added a code in the active method of the form data source to disable checkboxes in my form based on the value of another checkbox field from another form (ecoresproductvariantspercompany). The code is running perfectly on the development VM but when I deployed it on SandBOx and Production the code is not working for disabling the checkbox field. Here is my code 

public int active()
{
int ret;
FairFormTable fft;

fft = FairFormTable_ds.getFirst(true);
EcoResDistinctProductVariant ecoResDistinctProductVariant;
while select ecoResDistinctProductVariant
WHERE (fft.ItemId == ecoresdistinctproductvariant.displayProductNumber)
{
FairFormTable_ds.object(fieldNum(FairFormTable,VerifyConflictMaterials)).enabled(ecoResDistinctProductVariant.Conflict_Materials);
FairFormTable_ds.object(fieldNum(FairFormTable,VerifyCountryOfOrigin)).enabled(ecoResDistinctProductVariant.Country_Of_Origin);
FairFormTable_ds.object(fieldNum(FairFormTable,VerifyRequestCoC)).enabled(ecoResDistinctProductVariant.Request_CoC);
FairFormTable_ds.object(fieldNum(FairFormTable,VerifyMaterialsDeclaration)).enabled(ecoResDistinctProductVariant.Material_Declaration);
FairFormTable_ds.object(fieldNum(FairFormTable,VerifyHazardousSubstances)).enabled(ecoResDistinctProductVariant.Hazardous_Substances);
FairFormTable_ds.object(fieldNum(FairFormTable,FairVerified)).enabled(ecoResDistinctProductVariant.VendFairNeeded);
break;
}
ret = super();
return ret;
}

kindly give your suggestions to overcome this problem. Thanks,

Moeez Nawaz

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Code working in Dev enviornment but not in Production and Sandbox

    Hi,

    Is the version of your dev environment same as  your Production and Sandbox?

  • Moeez Nawaz Profile Picture
    15 on at
    RE: Code working in Dev enviornment but not in Production and Sandbox

    No, I didn't get any error messages.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Code working in Dev enviornment but not in Production and Sandbox

    HI,

    Did you get any error message?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,095 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans