Hi,
I want to enable/Disable the Add button ,Edit Button of the Customer Address(AddressTab) in the Cust Table Form . I can able to enable /Disable the other fields in the CustTable form by getting the DataSource control .using (Chain of Command) .

But I am unable to get the DataSource control of DirPartyPostalAddressView Since this view doesn't not belongs to the CustTable form .
I have tried the following code
[ExtensionOf(formDataSourceStr(CustTable, CustTable))]
final class CustTable_Extension
{
public int active()
{
int result = next active();
if(result)
{
FormDataSource fds= element.dataSource(formDataSourceStr(LogisticsPostalAddressGrid, DirPartyPostalAddressView));
fds.allowEdit(false);
fds.allowCreate(false);
//Also tried this code to get the datasource control
DirPartyPostalAddressView dirPartyPostalAddressView = element.DirPartyPostalAddressView;
FormDataSouce dirPartyPostalAddressViewfds = dirPartyPostalAddressView.datasource();
dirPartyPostalAddressViewfds.allowEdit(false);
}
return result;
}
}
But This doesnt work for the FormPart and also the view doesnt belong to the CustTable Form Datasource. May I know how can I restrict the FormPart from creating/Editing the record