restricted lookup

HI Friends,

I have a requirement that , for all places in a module i have to restrict the lookup for the Customer account , means for a company A lookup for customer will show only customers of company A where as For company B the lookup will show only customer of Company B at every places in the AR module.

Right now the custtable is shared so all customer are shown in the lookup.

Is it possible? Pls help.

Thanks

Manish

Hi manish,

i think u can write normal relation in the EDT level…in that it will show all the customer details in that particular table…

once u try…

i think this information useful to you…

When you share it, the data will not be specific to a DataAreaId(company), will be available across the companies that are under the virtual company. Then how will you differentiate the customers specific to a company?

Hi Kranti,

Let say that my custtable has a field company which stores the info that this customes belongs to this company . On the basis of this info i want to restrict the the lookup at every place in the module. is it possible?

Yes possible you can apply a range on your field, use curext()(takes up the current company) while assigning a value to your range, but this need a custom look-up building at several places. Or else you can use the security by applying record level security.

Hi Manish,

As kranthi said you can filter the data in look up.And one more thing you should consider.When you are filtereing you data in look up you should validate the data.For example.

Cust table has below records:

Id Company

Cust1 A

Cust2 B

Cust3 A

If you filter by company A,Look up will show Cust1,Cust3 but manually you are typing the Cust2 in form system will accept.So you need to validate in validatefield method.

Can you please explain record level security?

Hi All,

same question :

Can U explain how to Restricts form and report data according to location or country/region.

thanks

Manish

You can use the security policies frame work, http://msdn.microsoft.com/en-us/library/hh272123.aspx

(or) the record level security, http://msdn.microsoft.com/en-us/library/aa879172.aspx

HI Friends,

Some more explaination of my query:

when we open a report, the default dialog opens with a button Select . When you click on this button you will get range and sorting grid.

On range , there are three columns namely, Table,Field and criteria. Say if field is CustAccount , then on criteria lookup will show all customer . Now i want to restrict this lookup to show only those customer which belongs to current company.

So i want to write code at one place that will restrict lookup in all such places / or any alternative

Pls help.