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 AX (Archived)
Under review by Community Managers

Under review

Thank you for your post! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

A new Field on the location Form should be only enableable with a specific location type ?

Posted on by

Hi All 

on WHSLocation Form I have added a new FormCehckBoxControl and the requirment is : 

  • The new Field on the location Form should be only enableable for locations with a specific location type 
  • Determine specific location type 
  • Location => location profile => location type = warehouse management parameter => packing location type 

tha'ts meaning  if the WSHLocationProfile.LocType == 'VPG' then should be the checkbox true and the rest false 

What i have treid until now but i can't go forward thus i need help please 

[FormDataSourceEventHandler(formDataSourceStr(WHSLocation, WMSLocation), FormDataSourceEventType::Initialized)]
public static void WHSLocation_OnInitialized(FormDataSource sender, FormDataSourceEventArgs e)
{
WMSLocation wMSLocation = sender.cursor();
FormDataSource formDataSource = sender.formRun().dataSource('WMSLocation');
FormRun element = sender.formRun();
FormCheckBoxControl disableLicensPlate;

disableLicensPlate= element.design(0).controlName("WHSLocation_DisableLicensPlate");

WHSLOCATIONPROFILE wshLocationProfile;
WHSLOCATIONTYPE wshLocationType;

while select wshLocationProfile

{
if(wshLocationProfile.LocType == 'VPG')
{
disableLicensPlate.allowEdit(true);

}
else
{
disableLicensPlate.allowEdit(false);
}

}

}

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 AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans