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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer Service forum

How to Re-Initialize the Global variable Control

(0) ShareShare
ReportReport
Posted on by

My Requirement is need to be show/hide Purpose list in the lookup based on the master type(Customer, Vendor ) during adding the address details for the customer / vendors.

For customers need to show certain Purpose details list and Vendors need to show certain list.

So i have modified as mentioned below : 

In logistics postal address form, init method assign the purpose string control value. 

Like: rolesCtrl = SysLookupMultiSelectCtrl::construct(element, roles, queryStr(LogisticsLocationRolePostalLookup), true, [tableNum(LogisticsLocationRoleTranslation), fieldNum(LogisticsLocationRoleTranslation, Description)]);

I cannot go for Event handler, because I cant get/access the "rolesCtrl"  global variable. 

But in COC(Extension) am using custom query(XXXLogisticsLocationRolePostalLookup) like:

public void init()
{
next init();
this.rolesCtrl = SysLookupMultiSelectCtrl::construct(this, roles, queryStr(UseLogisticsLocationRolePostalLookup), true, [tableNum(LogisticsLocationRoleTranslation), fieldNum(LogisticsLocationRoleTranslation, Description)]);
}

am getting error: A control with the name 'Roles_Ids' already exists on the form.

Please advise How to do?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Customer Service

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans