Skip to main content
Solved

Projection Function not returning results


Forum|alt.badge.img+10
  • Sidekick (Customer)
  • 51 replies

We have created a projection function which returns array of results.

Projection

function ListQuotes List<Structure(ListQuoteResponse)> {
   parameter CompanyId Text;
   parameter ContactPersonId Text;
   parameter CustId Text;
   parameter SalesStatus  Text;
   parameter PageSize Integer;
   parameter PageNumber Integer;
}

PL/SQL

FUNCTION List_Quotes___ (
   company_id_ IN VARCHAR2,
   contact_person_id_ VARCHAR2,
   cust_id_ VARCHAR2,
   sales_status_  VARCHAR2,
   page_size_ INTEGER,
   page_number_ INTEGER) RETURN Proc_Core_Util_API.List_Quote_Response_Arr
IS
   
   quote_request_ Proc_Core_Util_API.List_Quote_Request_Rec;
   
BEGIN

   quote_request_.company_id := company_id_;
   quote_request_.contact_person_id := contact_person_id_;
   quote_request_.cust_id := cust_id_;
   quote_request_.sales_status := sales_status_;
   quote_request_.page_size := page_size_;
   quote_request_.page_number := page_number_;   
   
    RETURN Proc_Core_Util_API.List_Quotes(quote_request_);

END List_Quotes___;

 

The select query returns results when I make a call.

select * from Proc_Service_SVC.Rd_List_Quotes('ABC01', '106738', '123UK', null, 10, 1, 'ab')

 

So as below returns results.

 

DECLARE
   quote_request_ Proc_Core_Util_API.List_Quote_Request_Rec;
   response_ Proc_Core_Util_API.List_Quote_Response_Arr;
   
   temp_ varchar2(32000);
   
BEGIN

   quote_request_.company_id := 'ABC01';
   quote_request_.contact_person_id := '106738';
   quote_request_.cust_id := '123UK';
   quote_request_.sales_status := null;
   quote_request_.page_size := 10;
   quote_request_.page_number := 1;   
   
   response_ := Proc_Core_Util_API.List_Quotes(quote_request_);
   
   dbms_output.put_line (response_.COUNT);
    
   FOR  i IN 1..response_.COUNT 
      LOOP 
         
         temp_ := response_(i).total_orders  || ' ' || response_(i).quote_id || response_(i).return_code;
        
         dbms_output.put_line (temp_);
         
   END LOOP;   

END;

 

However when we make a postman GET request we get no result.

https://{{baseurl}}/int/ifsapplications/projection/v1/ProcService.svc/ListQuotes(CompanyId='ABC01',ContactPersonId='106738',CustId='123UK',SalesStatus='',PageSize=10,PageNumber=1)

 

{

    "value": []

}

Any idea what could be causing this problem with the projection?

 

Best answer by heibde

Does the user which is used to authenticate in Postman have neccessary access rights to see the quotes? So, did you really run the select statement that return records as the same user?

View original

3 replies

Forum|alt.badge.img+9
  • Hero (Employee)
  • 80 replies
  • Answer
  • July 7, 2023

Does the user which is used to authenticate in Postman have neccessary access rights to see the quotes? So, did you really run the select statement that return records as the same user?


Forum|alt.badge.img+10
  • Author
  • Sidekick (Customer)
  • 51 replies
  • July 8, 2023

Permission was an issue.


Forum|alt.badge.img+2

hi bhavesh

How did you resolve issue ?

thank you 


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