• pintoo rajput
  • NEWBIE
  • 65 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 1
    Likes Given
  • 53
    Questions
  • 19
    Replies
How can i integrate one SFDC org to another SFDC  org using Self-Signed certificate., is it possible.
OR
How to integrate Web(AWS) to salesforce using Self-Signed certificate


1-Opportunity Access Users in this role cannot access opportunities that they do not own that are associated with accounts that they do own
2-Users in this role can view all opportunities associated with accounts that they own, regardless of who owns the opportunities
3-Users in this role can edit all opportunities associated with accounts that they own, regardless of who owns the opportunities

if i select first one (cannot access opportunities) still manager are able to access subordinate opportunities, then what it means.?

Thanks in Advance

1-Opportunity Access Users in this role cannot access opportunities that they do not own that are associated with accounts that they do own
2-Users in this role can view all opportunities associated with accounts that they own, regardless of who owns the opportunities
3-Users in this role can edit all opportunities associated with accounts that they own, regardless of who owns the opportunities

I need to upload 100 contacts using dataloader, we have some validation rule on contact object, now my requirement is the validation rule should impose for 1 to 50 records and should not impose for 51 to 100 records, how to achieve this?  

Thanks in Advance
trigger should work for after insert , after update, after delete, after undelete 
 Thanks  in advance
global with sharing class GAPContractLoadXML
{
    WebService static String updateGapContractData(String xmlMessage)
    {
        Dom.Document xmlDoc = new Dom.Document();
        xmlDoc.load(xmlMessage);
        Gap gapObject = new Gap(xmlDoc.getRootElement());
        GapApplicant applicant = gapObject.applicant;
        GapContract contract = applicant.gapContract;

        try
        {
            // If no error sent, update gap fields in loan object
            if(String.isEmpty(contract.errorMessage))
            {
                // Get loan record to update
                Opportunity loan = [select Id from Opportunity where RemRef__c =: applicant.remRef limit 1];

                // Update loan          
                loan.Gap_Contract_Document__c = contract.contractDocument;
                loan.Gap_Contract_Number__c = contract.contractNumber;
                loan.Gap_Effective_Date__c = contract.effectiveDate;
                loan.Gap_Effective_Odometer__c = contract.effectiveOdometer;
                loan.Gap_Expiration_Date__c = contract.expirationDate;
                loan.Gap_Expiration_Odometer__c = contract.expirationOdometer;

                update loan;

                return 'Gap Contract Data Updated Sucessfully';
            }
            // Error sent - print to debug logs
            else
            {
                System.debug('=> Integration error updating Gap Contract Data: ' + contract.errorMessage);
                return '=> Integration error updating Gap Contract Data: ' + contract.errorMessage;
            }
        }
        catch(Exception e)
        {
            System.debug('=> Salesforce error updating Gap Contract Data: ' + e.getMessage());
            return '=> Salesforce error updating Gap Contract Data: ' + e.getMessage();
        }
    }

    global class Gap
    {
        global GapApplicant applicant{get;set;}
        
        global Gap(Dom.XmlNode node)
        {
            Dom.XmlNode child = node.getChildElement('applicant', null);
            if(child != null)
            {
                applicant = new GapApplicant(child);
            }            
        }
    }

    global class GapApplicant
    {
        global GapContract gapContract;
        global String origenateAppNumber;
        global String remRef;

        global GapApplicant(Dom.XmlNode node)
        {
            Dom.XmlNode child = node.getChildElement('GapContract', null);
            if(child != null)
            {
                gapContract = new GapContract(child);
            }
            
            child = node.getChildElement('OrigenateAppNumber', null);
            if(child != null)
            {
                origenateAppNumber = child.getText();
            }

            child = node.getChildElement('RemRef', null);
            if(child != null)
            {
                remRef = child.getText();
            }
        }
    }

    global class GapContract
    {
        global String contractDocument;
        global String contractNumber;
        global DateTime effectiveDate;
        global Integer effectiveOdometer;
        global DateTime expirationDate;
        global Integer expirationOdometer;
        global String errorMessage;

        global GapContract(Dom.XmlNode node)
        {
            Dom.XmlNode child = node.getChildElement('ContractDocument', null);
            if(child != null)
            {
                contractDocument = child.getText();
            }

            child = node.getChildElement('ContractNumber', null);
            if(child != null)
            {
                contractNumber = child.getText();
            }

            child = node.getChildElement('EffectiveDate', null);
            if(child != null)
            {
                effectiveDate = DateTime.valueOf(child.getText());
            }

            child = node.getChildElement('EffectiveOdometer', null);
            if(child != null)
            {
                effectiveOdometer = Integer.valueOf(child.getText());
            }

            child = node.getChildElement('ExpirationDate', null);
            if(child != null)
            {
                expirationDate = DateTime.valueOf(child.getText());
            }

            child = node.getChildElement('ExpirationOdometer', null);
            if(child != null)
            {
                expirationOdometer = Integer.valueOf(child.getText());
            }

            child = node.getChildElement('ErrorMessage', null);
            if(child != null)
            {
                errorMessage = child.getText();
            }
        } 
    }

}
global with sharing class GAPContractLoadXML
{
    WebService static String updateGapContractData(String xmlMessage)
    {
        Dom.Document xmlDoc = new Dom.Document();
        xmlDoc.load(xmlMessage);
        Gap gapObject = new Gap(xmlDoc.getRootElement());
        GapApplicant applicant = gapObject.applicant;
        GapContract contract = applicant.gapContract;

        try
        {
            // If no error sent, update gap fields in loan object
            if(String.isEmpty(contract.errorMessage))
            {
                // Get loan record to update
                Opportunity loan = [select Id from Opportunity where RemRef__c =: applicant.remRef limit 1];

                // Update loan          
                loan.Gap_Contract_Document__c = contract.contractDocument;
                loan.Gap_Contract_Number__c = contract.contractNumber;
                loan.Gap_Effective_Date__c = contract.effectiveDate;
                loan.Gap_Effective_Odometer__c = contract.effectiveOdometer;
                loan.Gap_Expiration_Date__c = contract.expirationDate;
                loan.Gap_Expiration_Odometer__c = contract.expirationOdometer;

                update loan;

                return 'Gap Contract Data Updated Sucessfully';
            }
            // Error sent - print to debug logs
            else
            {
                System.debug('=> Integration error updating Gap Contract Data: ' + contract.errorMessage);
                return '=> Integration error updating Gap Contract Data: ' + contract.errorMessage;
            }
        }
        catch(Exception e)
        {
            System.debug('=> Salesforce error updating Gap Contract Data: ' + e.getMessage());
            return '=> Salesforce error updating Gap Contract Data: ' + e.getMessage();
        }
    }

    global class Gap
    {
        global GapApplicant applicant{get;set;}
        
        global Gap(Dom.XmlNode node)
        {
            Dom.XmlNode child = node.getChildElement('applicant', null);
            if(child != null)
            {
                applicant = new GapApplicant(child);
            }            
        }
    }

    global class GapApplicant
    {
        global GapContract gapContract;
        global String origenateAppNumber;
        global String remRef;

        global GapApplicant(Dom.XmlNode node)
        {
            Dom.XmlNode child = node.getChildElement('GapContract', null);
            if(child != null)
            {
                gapContract = new GapContract(child);
            }
            
            child = node.getChildElement('OrigenateAppNumber', null);
            if(child != null)
            {
                origenateAppNumber = child.getText();
            }

            child = node.getChildElement('RemRef', null);
            if(child != null)
            {
                remRef = child.getText();
            }
        }
    }

    global class GapContract
    {
        global String contractDocument;
        global String contractNumber;
        global DateTime effectiveDate;
        global Integer effectiveOdometer;
        global DateTime expirationDate;
        global Integer expirationOdometer;
        global String errorMessage;

        global GapContract(Dom.XmlNode node)
        {
            Dom.XmlNode child = node.getChildElement('ContractDocument', null);
            if(child != null)
            {
                contractDocument = child.getText();
            }

            child = node.getChildElement('ContractNumber', null);
            if(child != null)
            {
                contractNumber = child.getText();
            }

            child = node.getChildElement('EffectiveDate', null);
            if(child != null)
            {
                effectiveDate = DateTime.valueOf(child.getText());
            }

            child = node.getChildElement('EffectiveOdometer', null);
            if(child != null)
            {
                effectiveOdometer = Integer.valueOf(child.getText());
            }

            child = node.getChildElement('ExpirationDate', null);
            if(child != null)
            {
                expirationDate = DateTime.valueOf(child.getText());
            }

            child = node.getChildElement('ExpirationOdometer', null);
            if(child != null)
            {
                expirationOdometer = Integer.valueOf(child.getText());
            }

            child = node.getChildElement('ErrorMessage', null);
            if(child != null)
            {
                errorMessage = child.getText();
            }
        } 
    }

}
<apex:page sidebar="false" standardStylesheets="false" showHeader="false" applyHtmlTag="false">
<head>
    <apex:stylesheet value="{!URLFOR($Resource.FoundationAssets, 'css/normalize.css')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.FoundationAssets, 'css/foundation.min.css')}"/>
    <apex:includeScript value="{!URLFOR($Resource.FoundationAssets,'js/vendor/jquery.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.FoundationAssets,'js/foundation.min.js')}"/>
   
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
</head> 
<body>
<!-- Button trigger modal -->
<a href="#" class="button" data-reveal-id="myModal" data-reveal="">Click Me For A Modal</a>

<!-- Modal -->
<div id="myModal" class="reveal-modal medium">
  <h2>Awesome. I have it.</h2>
  <p class="lead">Your couch.  It is mine.</p>
  <p>Im a cool paragraph that lives inside of an even cooler modal. Wins</p>
  <a class="close-reveal-modal">&#215;</a>
</div>
</body>
</apex:page>
<apex:page sidebar="false" standardStylesheets="false" showHeader="false" applyHtmlTag="false">
<head>
    <apex:stylesheet value="{!URLFOR($Resource.FoundationAssets, 'css/normalize.css')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.FoundationAssets, 'css/foundation.min.css')}"/>
    <apex:includeScript value="{!URLFOR($Resource.FoundationAssets,'js/vendor/jquery.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.FoundationAssets,'js/foundation.min.js')}"/>
   
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
</head> 
<body>
<!-- Button trigger modal -->
<a href="#" class="button" data-reveal-id="myModal" data-reveal="">Click Me For A Modal</a>

<!-- Modal -->
<div id="myModal" class="reveal-modal medium">
  <h2>Awesome. I have it.</h2>
  <p class="lead">Your couch.  It is mine.</p>
  <p>Im a cool paragraph that lives inside of an even cooler modal. Wins</p>
  <a class="close-reveal-modal">&#215;</a>
</div>
</body>
</apex:page>
H!! my code is below

<apex:page sidebar="false" standardStylesheets="false" showHeader="false" applyHtmlTag="false">
<head>
    <apex:stylesheet value="{!URLFOR($Resource.FoundationAssets, 'css/normalize.css')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.FoundationAssets, 'css/foundation.min.css')}"/>
    <apex:includeScript value="{!URLFOR($Resource.FoundationAssets,'js/vendor/jquery.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.FoundationAssets,'js/foundation.min.js')}"/>
   
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
</head> 
<body>
<!-- Button trigger modal -->
<a href="#" class="button" data-reveal-id="myModal" data-reveal="">Click Me For A Modal</a>

<!-- Modal -->
<div id="myModal" class="reveal-modal medium">
  <h2>Awesome. I have it.</h2>
  <p class="lead">Your couch.  It is mine.</p>
  <p>Im a cool paragraph that lives inside of an even cooler modal. Wins</p>
  <a class="close-reveal-modal">&#215;</a>
</div>
</body>
</apex:page>
I need to upload 100 contacts using dataloader, we have some validation rule on contact object, now my requirement is the validation rule should impose for 1 to 50 records and should not impose for 51 to 100 records, how to achieve this?  

Thanks in Advance
trigger should work for after insert , after update, after delete, after undelete 
 Thanks  in advance
<apex:page sidebar="false" standardStylesheets="false" showHeader="false" applyHtmlTag="false">
<head>
    <apex:stylesheet value="{!URLFOR($Resource.FoundationAssets, 'css/normalize.css')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.FoundationAssets, 'css/foundation.min.css')}"/>
    <apex:includeScript value="{!URLFOR($Resource.FoundationAssets,'js/vendor/jquery.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.FoundationAssets,'js/foundation.min.js')}"/>
   
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
</head> 
<body>
<!-- Button trigger modal -->
<a href="#" class="button" data-reveal-id="myModal" data-reveal="">Click Me For A Modal</a>

<!-- Modal -->
<div id="myModal" class="reveal-modal medium">
  <h2>Awesome. I have it.</h2>
  <p class="lead">Your couch.  It is mine.</p>
  <p>Im a cool paragraph that lives inside of an even cooler modal. Wins</p>
  <a class="close-reveal-modal">&#215;</a>
</div>
</body>
</apex:page>
I have a page block section contain picklist and input filed i filled all the field and picklist also .after that i clicked "add more" button it re render same page block without values BUT ABOVE SECTION SHOULD BE FILLED AS IT IS PICKLIST ALSO plz solve it
I have a page block section contain picklist and input filed i filled all the field and picklist also .after that i clicked "add more" button it re render same page block without values BUT ABOVE SECTION SHOULD BE FILLED AS IT IS PICKLIST ALSO plz solve it 
My vf Page-

<apex:page sidebar="false" standardStylesheets="false" showHeader="false">
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"/>
    <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js"/>

    <apex:includeScript value="{!URLFOR($Resource.bootstrap, 'bootstrap/js/bootstrap.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.bootstrap, 'bootstrap/js/bootstrap.min.js')}"/>
  
    <apex:stylesheet value="{!URLFOR($Resource.bootstrap, 'bootstrap/css/bootstrap.css')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.bootstrap, 'bootstrap/css/bootstrap.min.css')}"/>
  
   
     <link href="//getbootstrap.com/examples/signin/signin.css" rel="stylesheet" media="screen"/>
    


<!-- Button trigger modal -->
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>
</apex:page>
Dear all,


PAGE-
<apex:page controller="myComponentCon">
<apex:form >
<apex:outputPanel id="pan">

    <c:ComponentDisplayEmpName componentRegistration="Registration__c.FirstName__c">
     </c:ComponentDisplayEmpName>
     </apex:outputPanel>
     <apex:commandButton value="Add More" action="{!addmore}" reRender="pan"/>
     <apex:commandButton value="Submit" action="{!submit}"/>
    </apex:form>
</apex:page>




Custom Component-

<apex:component controller="myComponentCon">
    <apex:attribute name="var" type="String" description="The variable to represent a single Registrationin the iteration."/>
    <apex:repeat var="componentRegistration" value="{!reg}">
        <apex:componentBody >   
            <apex:outputText value="First Name"/>
            <apex:inputfield value="{!componentRegistration}"/>
        </apex:componentBody>
       
    </apex:repeat>
</apex:component>



Controller-


public class myComponentCon {

    public String getMyComponentCon() {
        return null;
    }

public List<Registration__c> reg {get;set;}
   
public myComponentCon ()
{
reg= new List<Registration__c>();
if(reg.size()==0)
{
Registration__c obj =new Registration__c();
reg.add(obj);
}
}
   
   
    public void addmore()
    {
    Registration__c obj =new Registration__c();
reg.add(obj);
system.debug(reg);
    }
   
    public void submit()
    {
    system.debug('reg'+reg);
   
   
    }
  

Hi there,

i'm implementing Salesforce2Salesforce for a customer. I'm using triggers on the receiving org to create the correct relationships (eg. when sending a single opportunity)

I managed to get this working, however it would have been much easier if i could enable debugging for the "Connection user" (the user that performs the actions on behalf of the shared connection) This is not possible using the normal monitoring.

 

Anyone have a good workaround?