Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Copper Elite Contributor
Posts: 70
Registered: ‎04-30-2009

SLX Web 7.5.1 - SQL Views

Hi,

 

How can we access a SQL view in slx web? We mainly need this for the group builder, because we want to use a Saleslogix enabled view in web groups.

 

Thanks

~ Henry 

Gold Super Contributor
Posts: 3,087
Registered: ‎03-19-2009

Re: SLX Web 7.5.1 - SQL Views

Take a look at some of the postings in the Partner/Sage forums (Global Dev).. there's some postings on the subject there with things you need to watch out for.
--
RJ Ledger - rjledger@rjlSystems.net +1 603.369.3047 x101

".. Innovators in Mobility - Experts in Workflow Automation..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
Bronze Super Contributor
Posts: 236
Registered: ‎03-30-2009

Re: SLX Web 7.5.1 - SQL Views

Henry,

   You can create the view in AA as you would any other table.  However, there is an issue with resolving key fields on existing db views when creating the entity in App Architect. To workaround this, you will need to open the actual XML definition file for the entity based on the view. This can be done using any windows text editor you prefer. The following steps should correct this problem for the view "MyView":

  1. Navigate to the folder "Model\Entity Model\SalesLogix Application Entities\MyView" using windows file explorer if working in a Local File System (LFS), or use VFS explorer in App Architect if you're working from a database VFS.
  2. Open the file "MyView.MYVIEW.entity.xml in an editor of your choosing
  3. Find the end tag that reads "/ExtendedPropertiesCollection"
  4. Immediately after this section (and before the section "properties"), a section titled "keyProperties" should exist in the file, if not, add the following lines to the file:
    1. keyProperties
    2. keyReference id="ID from desired key property" ordinalPosition="1" /
    3. /keyProperties
  5. Replace the text "ID from desired key property" with the "id" value of the property that you wish to make the key. Keep the following in mind:
    1. These will appear in properties section of the file
    2. You will want to use GUID that is in the field "id"
    3. You can add as many as you like, just be sure that the "ordinalPosition" tag is unique for each field
    4. Be sure to paste the id within the double quotes
  6. At this point, you should be able to save the file, re-build your entities, build the website and deploy the app.


Note that I had to remove all the greater than and less than signs from the above text to get it to post correctly here. You can use the XML file from any other entity as an example of what the syntax should look like.

Mike LaSpina
Professional Services Consultant

Sage
8800 N Gainey Center Dr Ste 200
Scottsdale AZ 85258
Tel: 480-383-5344
Cell: 480-321-6637
Fax: 480-556-4090
mike.laspina@sage.com

Your Business in Mind.
Employee
Posts: 22
Registered: ‎07-08-2008

Re: SLX Web 7.5.1 - SQL Views

Can you provide an example of the "id" value of the property or possibly where to find it?
Highlighted
Bronze Super Contributor
Posts: 236
Registered: ‎03-30-2009

Re: SLX Web 7.5.1 - SQL Views

Matthew,

   The ID would be in the <properties> section of thexml file. Use one of those proprties to define the key value.  Be sure to use the GUID from the property you wish to use.  You can see an example of this in the file Account.ACCOUNT.entity.xml.  Note that the key properties correspond to the IDs from the properties section.

Mike LaSpina
Professional Services Consultant

Sage
8800 N Gainey Center Dr Ste 200
Scottsdale AZ 85258
Tel: 480-383-5344
Cell: 480-321-6637
Fax: 480-556-4090
mike.laspina@sage.com

Your Business in Mind.