Skip to main content
Solved

Place Lookup restriction on Request

  • September 24, 2021
  • 3 replies
  • 127 views

Forum|alt.badge.img+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. 

Best answer by Atheeq Maharoof

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

 

View original

3 replies

Atheeq Maharoof
Superhero (Employee)
Forum|alt.badge.img+12
  • Superhero (Employee)
  • 89 replies
  • Answer
  • September 24, 2021

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

 


Forum|alt.badge.img+6
  • Sidekick (Customer)
  • 20 replies
  • October 13, 2021

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.


Forum|alt.badge.img+4
  • Author
  • Do Gooder (Customer)
  • 10 replies
  • October 13, 2021

Hi,

 

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

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings