• Hero285Link
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

Hi everybody, Im a little confused about relationships,  http://imageshack.us/f/850/0j4e.png/    this is my schema model, 

Contact(they are my employes), Accounts(they Are my enterprises), Servicio(they are my pack of services every pack contains some products), EmpresaServicio(they are Are my relationships betwen Accounts,and Servicio), Producto( they Are my products), And ServicioProducto(they are the relationship betwen Servicio and producto),

So i been working with a visual force page,, my idea is: My Account get some Services, and Contact can Acces only to the Services of his Account, and it will be able to see what products contain that service, 

but i dont know how,,  y cant see the services on my Contac perspective, i want to be able to acces to the products too,,

 

 

This is my controller

 

public Contact miContacto{get;set;}
public Account miEmpresa{get;set;}

public ClienteServicioController(){
miContacto=[Select id,Name,RFC__c,Edad__c,Sexo__c, Contact.Account.Name
From Contact
WHERE Id = :ApexPages.currentPage().getParameters().get('id')];

miEmpresa=[Select id,Name,RFC__c,
(Select id,Name,RFC__c,Edad__c,Sexo__c From Contacts
WHERE Id = :ApexPages.currentPage().getParameters().get('id')),
(Select Account__c, Servicio__c, Servicio__r.PrecioServicio__c,Servicio__r.Name from EmpresasServicios__r)
from Account ];
}

 

 My apex page URL Contain the Contac ID.

 

 

<apex:repeat var="client" value="{!miContacto}" >
<h2><span>Servicios <strong>DISPONIBLES</strong> para {!client.Name}</span></h2>
</apex:repeat>
<div id="items">


<apex:repeat var="prueba" value="{!miEmpresa.EmpresasServicios__r}" >
<h2><span>Servicios <strong>DISPONIBLES</strong> para {!prueba.Servicio__r.Name}</span></h2>
</apex:repeat>

 

Im trying to get the Services based on my Contact ID

I hope you can help me,, im confused.

 

Thank you All

Hello everyone, 

Im new In this Environment and I had been stuck for several hours,,

my question is...

Is it possible to take my field Name(Text), From my object Account,, and display it on my Visual Force Page as a PickList or as a SearchPanel, where the user could easily choose a predefined Name from Account???

Hi everybody, Im a little confused about relationships,  http://imageshack.us/f/850/0j4e.png/    this is my schema model, 

Contact(they are my employes), Accounts(they Are my enterprises), Servicio(they are my pack of services every pack contains some products), EmpresaServicio(they are Are my relationships betwen Accounts,and Servicio), Producto( they Are my products), And ServicioProducto(they are the relationship betwen Servicio and producto),

So i been working with a visual force page,, my idea is: My Account get some Services, and Contact can Acces only to the Services of his Account, and it will be able to see what products contain that service, 

but i dont know how,,  y cant see the services on my Contac perspective, i want to be able to acces to the products too,,

 

 

This is my controller

 

public Contact miContacto{get;set;}
public Account miEmpresa{get;set;}

public ClienteServicioController(){
miContacto=[Select id,Name,RFC__c,Edad__c,Sexo__c, Contact.Account.Name
From Contact
WHERE Id = :ApexPages.currentPage().getParameters().get('id')];

miEmpresa=[Select id,Name,RFC__c,
(Select id,Name,RFC__c,Edad__c,Sexo__c From Contacts
WHERE Id = :ApexPages.currentPage().getParameters().get('id')),
(Select Account__c, Servicio__c, Servicio__r.PrecioServicio__c,Servicio__r.Name from EmpresasServicios__r)
from Account ];
}

 

 My apex page URL Contain the Contac ID.

 

 

<apex:repeat var="client" value="{!miContacto}" >
<h2><span>Servicios <strong>DISPONIBLES</strong> para {!client.Name}</span></h2>
</apex:repeat>
<div id="items">


<apex:repeat var="prueba" value="{!miEmpresa.EmpresasServicios__r}" >
<h2><span>Servicios <strong>DISPONIBLES</strong> para {!prueba.Servicio__r.Name}</span></h2>
</apex:repeat>

 

Im trying to get the Services based on my Contact ID

I hope you can help me,, im confused.

 

Thank you All

Hello everyone, 

Im new In this Environment and I had been stuck for several hours,,

my question is...

Is it possible to take my field Name(Text), From my object Account,, and display it on my Visual Force Page as a PickList or as a SearchPanel, where the user could easily choose a predefined Name from Account???

Hi everybody, Im a little confused about relationships,  http://imageshack.us/f/850/0j4e.png/    this is my schema model, 

Contact(they are my employes), Accounts(they Are my enterprises), Servicio(they are my pack of services every pack contains some products), EmpresaServicio(they are Are my relationships betwen Accounts,and Servicio), Producto( they Are my products), And ServicioProducto(they are the relationship betwen Servicio and producto),

So i been working with a visual force page,, my idea is: My Account get some Services, and Contact can Acces only to the Services of his Account, and it will be able to see what products contain that service, 

but i dont know how,,  y cant see the services on my Contac perspective, i want to be able to acces to the products too,,

 

 

This is my controller

 

public Contact miContacto{get;set;}
public Account miEmpresa{get;set;}

public ClienteServicioController(){
miContacto=[Select id,Name,RFC__c,Edad__c,Sexo__c, Contact.Account.Name
From Contact
WHERE Id = :ApexPages.currentPage().getParameters().get('id')];

miEmpresa=[Select id,Name,RFC__c,
(Select id,Name,RFC__c,Edad__c,Sexo__c From Contacts
WHERE Id = :ApexPages.currentPage().getParameters().get('id')),
(Select Account__c, Servicio__c, Servicio__r.PrecioServicio__c,Servicio__r.Name from EmpresasServicios__r)
from Account ];
}

 

 My apex page URL Contain the Contac ID.

 

 

<apex:repeat var="client" value="{!miContacto}" >
<h2><span>Servicios <strong>DISPONIBLES</strong> para {!client.Name}</span></h2>
</apex:repeat>
<div id="items">


<apex:repeat var="prueba" value="{!miEmpresa.EmpresasServicios__r}" >
<h2><span>Servicios <strong>DISPONIBLES</strong> para {!prueba.Servicio__r.Name}</span></h2>
</apex:repeat>

 

Im trying to get the Services based on my Contact ID

I hope you can help me,, im confused.

 

Thank you All

Hello everyone, 

Im new In this Environment and I had been stuck for several hours,,

my question is...

Is it possible to take my field Name(Text), From my object Account,, and display it on my Visual Force Page as a PickList or as a SearchPanel, where the user could easily choose a predefined Name from Account???