Solved

Place Lookup restriction on Request

  • 24 September 2021
  • 3 replies
  • 117 views

Userlevel 1
Badge +4

Hi,

When logging requests we would like to only see the customer’s whose places to select from instead of listing our invoice, suppliers places etc. Is there a way to restrict the view of this? 

I have tried a constraint into the UI design screen for the Request screen and PLACE ID look up navigation but with no luck. 

icon

Best answer by Atheeq Maharoof 24 September 2021, 16:27

View original

3 replies

Userlevel 5
Badge +12

Hi @TSQTINAMCF ,
 

The end goal of restricting the place lookup only to show Customer's Place will be to save the new request with Place Id which only belongs to customers place as whos place. If this is what you are looking for, following is the process.

 

In order to achieve this objective, you can write a client script for the save button in the request screen.
 

var place_id = getControlValue('place','place_id');

if(isNullOrEmptyString(place_id) != true){

    var whos_place = getDBValue('GET_WHOSPLACE_FROM_PLACE_ID',place_id);

    if(whos_place != 'CUST'){

        alert('Please select a place which has whos place as customers place');

    }

}


Following is the DB script used for the above script.
 

SELECT whos_place FROM place WHERE place_id  = '{0}'

 

As another approach , you can trigger a validation business rule on the request table by keeping the execution point Before Save.

 

Hope this answer helps.

 

Best Regards,
Atheeq

 

Userlevel 3
Badge +6

HI @TSQTINAMCF,

 

  Just do the right click over the field in the UI designer and then Click on SETup lookup Navigation 
then add navigation fields I am sharing a screenshot how we are getting only sales org from whos_place hope like this you can also setup your lookup navigation.

Userlevel 1
Badge +4

Hi,

 

Thank you this has worked i was trying in the constraints now only shows customers when trying to raise a request. 

 

 

Reply