• sslp
  • NEWBIE
  • 0 Points
  • Member since 2012

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

I have a managed package object (Custom Quote) that has a look up to Opportunity. I want everyone who has access (record level) to an Opportunity record to have the same level of access to all Custom Quote records that are related to that opportunity record.

 

Example: Q1,Q2 are linked to Op1, so if user1 has read access to Op1 they should have the same access to Q1,Q2. user1 could have been granted access via sharing setting,apex,owd,role hierarchy,ownerchange,manual sharing but they should still have access to Q1,Q2 

 

When I use Apex managed sharing, I can share Custom Quote records when Opportunities are created/edited/deleted etc but how do I handle the usecase where an admin creates a new sharing rule for an opportunity record? or a new user gets access to an opportunity record becase of role hierarchy or OWD? It is my understanding that we cannot write triggers on OpportunityShare object, is there any other way I can detect a new sharing allowed or removed on an opportunity record?

 

I also thought of scheduled batch process , I can have the process run every 30mins or so and look for new OpportunityShare records , but how do I detect deletions of opportunity share records? 

 

Any help would be greatly appreciated.

 

Thanks,

Saraag

  • January 24, 2013
  • Like
  • 0

Hi Everyone,

 

Thanks for taking out time to read this post. I'm running into issues with alignment while rendering a VF page as PDF. Here is the code for it.

 

<apex:outputLabel value="To Whom It May Concern:" styleclass="itText"/> 
<br/><br/>
<apex:outputLabel value="It is my privilege to inform you that xxx has named" styleclass="itText"/>
<b><apex:outputLabel value="{!partnerName}" styleclass="itText"/></b>
<apex:outputLabel value="a Certified/Specialized Partner. Having applied for and met the requirements for Certification/Specialization, they can sell the following Product(s) within the United States." styleclass="itText"/> <br/><br/>



 <apex:panelGrid columns="2">
 
 <apex:outputPanel rendered="{!NOT(ISNULL(partnerCertOnly))}">
  <table border="0">
   <tr>
     <th>Specialization</th><th>Expiration Date</th>
   </tr>
      <apex:repeat value="{!partnerCertOnly}" var="Pcert">
      
        <tr>
		        <td> 
		          <apex:outputText value="{!Pcert.Certification__r.Name}"/> 
		        </td>
		        <td> 
		          <apex:outputText value="{0,date,dd/mm/yyyy}" >
		             <apex:param value="{!Pcert.Expiration_Date__c}"/> 
		          </apex:outputText>		        
		        </td>
	       </tr> 
      </apex:repeat>
  </table>
 </apex:outputPanel>  
   
      
      <!--  of record type specializations -->
  
   <apex:outputPanel rendered="{!NOT(ISNULL(partnerSpecOnly))}">    
     <table border="0">
       <tr>
            <th>Specialization</th><th>Expiration Date</th>
       </tr>
      <apex:repeat value="{!partnerSpecOnly}" var="Pspec">
	       <tr>
		        <td> 
		          <apex:outputText value="{!Pspec.Certification__r.Name}"/> 
		        </td>
		        <td> 
		          <apex:outputText value="{0,date,dd/mm/yyyy}" >
		             <apex:param value="{!Pspec.Expiration_Date__c}"/> 
		          </apex:outputText>		        
		        </td>
	       </tr> 
       </apex:repeat>
      </table> 
   </apex:outputPanel>
    
</apex:panelGrid>

 

I get this, notice the second the table starts from next line. It actaully goes further down if first table (table in first column of panel grid) has more rows.

Not sure what I'm doing wrong, I only used PDF safe VF components. When I removed renderAs=PDF the alignment issue is gone. Any thoughts?

 

Thanks,

slp

 

  • October 30, 2012
  • Like
  • 0

Hey everyone, I'm still new to Visualforce, I've created a couple pages but I've run in to a problem where the page is not displaying correctly. When I edit the page in development mode, everything looks fine but when I view the page on the site (http://collisionmax.force.com/agentsportal110), it only shows the first field. Any idea why this is happening?

 

Here is my code -

 

<apex:page standardController="Agent_Portal__c" showHeader="false">
    <apex:image value="http://www.collisionmaxagents.com/NE-Philadelphia.jpg"></apex:image>
    
    <apex:form >
        <apex:pageBlock mode="New">
            <apex:pageBlockSection title="Referral Information" columns="1">    
            <apex:pageBlockSection >
            <apex:inputField value="{!Agent_Portal__c.Insured_s_Name__c}"/>
            </apex:pageBlockSection>
          
            <apex:pageBlockSection >
            <apex:inputField value="{!Agent_Portal__c.Insured_s_Phone__c}"/>
            </apex:pageBlockSection>
          
            <apex:pageBlockSection columns="1" >
            <apex:inputField value="{!Agent_Portal__c.Agency_Name__c}" required="true"/>
            </apex:pageblocksection>
            
            <apex:pageBlockSection >
            <apex:inputField value="{!Agent_Portal__c.Agency_Contact__c}"/>
            </apex:pageBlockSection>
            
             <apex:pageBlockSection >
            <apex:inputField value="{!Agent_Portal__c.Insurance_Company__c}"/>
            </apex:pageBlockSection>
           
            <apex:pageBlockSection >
            <apex:inputField value="{!Agent_Portal__c.Rental_Coverage__c}"/>
            </apex:pageBlockSection>
            
            <apex:pageBlockSection >
            <apex:inputField value="{!Agent_Portal__c.Additional_Comments__c}"/>
            </apex:pageBlockSection>
            
           </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
    </apex:page>

 

 

Thanks,

Greg

Hi Everyone,

 

Thanks for taking out time to read this post. I'm running into issues with alignment while rendering a VF page as PDF. Here is the code for it.

 

<apex:outputLabel value="To Whom It May Concern:" styleclass="itText"/> 
<br/><br/>
<apex:outputLabel value="It is my privilege to inform you that xxx has named" styleclass="itText"/>
<b><apex:outputLabel value="{!partnerName}" styleclass="itText"/></b>
<apex:outputLabel value="a Certified/Specialized Partner. Having applied for and met the requirements for Certification/Specialization, they can sell the following Product(s) within the United States." styleclass="itText"/> <br/><br/>



 <apex:panelGrid columns="2">
 
 <apex:outputPanel rendered="{!NOT(ISNULL(partnerCertOnly))}">
  <table border="0">
   <tr>
     <th>Specialization</th><th>Expiration Date</th>
   </tr>
      <apex:repeat value="{!partnerCertOnly}" var="Pcert">
      
        <tr>
		        <td> 
		          <apex:outputText value="{!Pcert.Certification__r.Name}"/> 
		        </td>
		        <td> 
		          <apex:outputText value="{0,date,dd/mm/yyyy}" >
		             <apex:param value="{!Pcert.Expiration_Date__c}"/> 
		          </apex:outputText>		        
		        </td>
	       </tr> 
      </apex:repeat>
  </table>
 </apex:outputPanel>  
   
      
      <!--  of record type specializations -->
  
   <apex:outputPanel rendered="{!NOT(ISNULL(partnerSpecOnly))}">    
     <table border="0">
       <tr>
            <th>Specialization</th><th>Expiration Date</th>
       </tr>
      <apex:repeat value="{!partnerSpecOnly}" var="Pspec">
	       <tr>
		        <td> 
		          <apex:outputText value="{!Pspec.Certification__r.Name}"/> 
		        </td>
		        <td> 
		          <apex:outputText value="{0,date,dd/mm/yyyy}" >
		             <apex:param value="{!Pspec.Expiration_Date__c}"/> 
		          </apex:outputText>		        
		        </td>
	       </tr> 
       </apex:repeat>
      </table> 
   </apex:outputPanel>
    
</apex:panelGrid>

 

I get this, notice the second the table starts from next line. It actaully goes further down if first table (table in first column of panel grid) has more rows.

Not sure what I'm doing wrong, I only used PDF safe VF components. When I removed renderAs=PDF the alignment issue is gone. Any thoughts?

 

Thanks,

slp

 

  • October 30, 2012
  • Like
  • 0