cancel
Showing results for 
Search instead for 
Did you mean: 

How to access SADL options of a Standard Query on a custom EC/OWL

former_member232970
Participant
0 Kudos

Hi,

could anyone explain how get access to the SADL option of a standard query on a custom EC/OWL.

When I add a query to my custom EC/OWL, I don't have the possibility to indicate which query properties should be available on the selection, basic find and on the result (See screenshot below).

The goal that I want to achieve is to display certain opportunities on a custom EC/OWL on the TI of accounts.

The user should be able to filter the list of opportunities by means of the "Find" functionality or by means of the advance search functionality.

I tried different approaches mentioned on other post, but still I am not able to set-up my  UIComponent correctly.

I have already perform the necessary set-up in order to retrieve the target opportunities and display them on a advanceListPane on the UI.

I'm facing the following problems:

  • The "Find" functionality don't perform any kind of filtering on the list.
  • In case I want to add extra parameters to the "search parameters" structure defined on the DataModel based on the query, I receive the following error:

I would really appreciate if someone could point me in the right direction.

in case I'm doing something wrong or something should be perform on a different way, please let me know.

Many thanks in advance.

kind regards,

Andres

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Andres,

I am not sure where the entry blog mentioned by Horst is not working for you.

From the error screenshot you pasted in your question, I gather that you select the query parameter the wrong way.

You need to Add query parameters via the query in the controller tab.

Please note that the basic find field needs a different handling:

The basic find search field is created when creating an advanced search pane.

The "SearchText" parameter of the query needs to be bound to this auto-created field.

After you have done this, you can place these query parameter bound data fields in the advanced search pane using drag&drop:

Hope this answers your question correct,

Best regards,

Ludger Bünger

--

all4cloud.de

former_member232970
Participant
0 Kudos

Hi Ludger,

Coming back to you feedback, I would like some explanation regarding an problem that I'm facing.

I created an EC where I display opportunity data and bind it to opportunity TI using inport/outport set-up. This part it's working fine.

However, Now I want to read information from other opportunity which is linked to the displayed opportunity on the screen and displayed on the same EC. The linked opportunity ID is stored on a extension field on the opportunity BO.

To achieve my goal, I performed the following steps:

  1. Define a list on the DataModel and binded the necessary attributes ==> Info to be displayed from linked opportunity.
  2. Create a Query for opportunities.

However, I'm not able to select/add any query parameter. The add button is grayed out.

See screenshot below.

What I'm doing wrong?

thanks in advance for any feedback.

kind regards,

Andres

former_member232970
Participant
0 Kudos

Ludger,

Nvm, I just discovered that I forgot to bind DataModel List to Query

thanks anyway,

kind regards,

Andres

Answers (3)

Answers (3)

Former Member
0 Kudos

This would be possible with a SADL query on top of the opportunity BO.

High level steps

1. Create a OWL and bind it to the opportunity BO

-Add a SADL query to it

-Add the customer ID or whatever you want as the find parameters to the SADL query

-Add an inport and bind it to the customer ID find parameter

-Add an event handler to fire the query on the inport

2. Create an EC, add the OWL floor plan to it

-Add an inport of the customer ID

-Add an outport of the customer ID

-Add an event handler to fire the outport on the inport

-Bind the OWL inport (created in step 1) to the EC outport

3. Add the EC to the account TI

-Bind the Account TI public outport to the EC customer ID inport (created in step 2)

NagaPrakashT
Contributor
0 Kudos

Hi Rei,

How to include the selection for specific values in query like retrieve the data only for document types 'A1' ,'A3' and 'A7'.

For a single Opportunity, i want show the users only Sales Orders and Customer Quotes no need show the Task, Activity etc

Thanks,

Naga

Former Member
0 Kudos

These would be nothing more than query parameters on one of the find enabled SADL elements. I suggest you first get the generic SADL query working (get the list to populate a list of BOs) once that is working then next get the advanced filter working where you can filter on the fields you enabled for filtering. Once that is working the last step is to automate/default that with the inports/outports described above.

I suggest someone on the SDK community to create a how-to on this example (hint ) as it is straight forward if you follow the steps exactly, but not documented anywhere (so almost clear to impossible to figure it out yourself). This is how our standard developers create all lists in our core code line.

NagaPrakashT
Contributor
0 Kudos

Hi Experts,

Can some one help me. I am unable to get this. Like Rei said a document would be much appreciated.

Thanks,

Naga

NagaPrakashT
Contributor
0 Kudos

Hi Rie,

I am able to get the all document types associated with Opportunity. How do i apply filters to display only few document types.

former_member232970
Participant
0 Kudos

@Horst

thanks for the link, its something that i will try later on ^^

However I believe that I will not be able to apply this approach on my current development.I would need to made availlabel standard attributes on the query definition and not custom attributes. Is this possible?

It's possible to add attribute: "Opportunity ==> AttachmentFolder ==> Document ==> AlternativeName" ??

@Ludger:

You were rigth when you mentioned that i was creating the binding in wrong way. I was trting to create the binding on the "DataModel" and not in "Query Definifition". thanks for pointing me in the rigth direction.

however could you please point me in the rigth direction in case I want to filter the collection on a attribute which is NOT a query parameter?

Also, is there any Query to retrieve attachments of a opportunity based on customer ID?

currently i'm tackling this case as follow:

  • Retrieve all customer opportunities by means of the Opportunity queryByElement.
  • Build a second list (by mean of a script) which contain all attachments  by opportunity.
  • assign second list to a advanceListPanel and display it on the UI.

However know I want to allow the user to filter the attachtment advanceListPanel  on the document name.But:

  1. I dont see how I can add an extra parameter on the standard search functionlity of the advanceListPanel which I could use on my script to filter the second collection.
  2. Currenltly i'm trying to achieve my goals by means of a extra section group which contains an inputField + Button to handle the filtering. However I encounter some issues which this approach for which i need to find a solution (See Blog).

Any tip or suggestion coming from you guy's is welcom ^^

thanks in advance

kind regards,

Andres

Former Member
0 Kudos

Hi Andres,

there is no conventional way to filter a collection on an attribute which is not a query parameter.

That said, here are some suggestions of unconvientional ways:

1. Copy the collection using front end scripting and then then deleting the undesires entries using said front end scripting.
2. Create a custom query to solve your issue.

Since I do not like front end scripting (it is clumpsy, slow, error prone and difficult to debug) I would chose the second approach.

The obstacle one needs to solve is that you can not define custom queries for standard BO's

However, there is a solution to this:

Create a custom BO mirroring every entry of the standard BO with an association to the standard BO and define the query on this mirror BO.

This can be done via the BeforeSafe-Event of the standard BO:

  1. Use the UUID or some other unique key of the standard BO as alternative key to your custom BO
  2. Retrieve your mirror BO using this unique key derived from the standard BO
  3. Check whether the mirror custom BO exists.
  4. if not: create, set the alternative key and the association to the standard BO.
  5. create your custom query on this mirror BO using the association to access the standard BO entries

This method has the drawback that it will create the mirror BO entries only after the standard BO has been modified and saved once.

However this is only an initial issue. Newly created instances of the standard BO will not have this issue anymore.

You can create all the initially missing mirror BO entries by implementing a custom method that will query all standard BO entries and then "touch" them by modifying something (e.g. a custom field).

Best regards,

Ludger

--

all4cloud.de

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Andres,

Sorry, but it is not possible to enhance a query structure with standard fields.

Sorry,

   Horst

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Andres,

Does this blog help you?

Bye,

   Horst

former_member232970
Participant
0 Kudos

Horst thanks for your suggestion and sorry for late response.

In case my finding/thoughts mentioned below are not correct, please let me know.

I tried the same approach but it didn’t work. De example describe on the Blog was build based on a custom BO.  This approach only works due the fact that you have access to the query key parameters. In my case due the fact that I work with the standard query of opportunities, I’m not able to add extra parameter to the (search) structure. I don’t have access on the DataModel  view to the node Opportunity è QueryByElements. This node contains query attributes that could be added to the (search) structure.

Currently I’m trying a different approach by means of an extra section group which contains my filter attributes. However I’m also stuck :’(

Do you have any other suggestion?

Btw: is there any way to debug an script defined under an event handler in de UI Designer?

Thanks in advance,

Kind regards,

Andres

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Andres,

As mentioned in the other blog:

Debugging of Frontend Scripting is not possible.

This blog describes how to add extension fields to a standard query.

Maybe this helps?

Bye,

   Horst