web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

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

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    HI,

    Did you get any error message?

  • Moeez Nawaz Profile Picture
    15 on at

    No, I didn't get any error messages.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 45 Most Valuable Professional

#2
iampranjal Profile Picture

iampranjal 36

#3
Satyam Prakash Profile Picture

Satyam Prakash 31

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans