• Sourabh Tayal 5
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies
I am using opportunity in wrapper class type list.
Here on opportunity i have 2 lookup 1 for account and 1 for contact. on contact lookup field i have apply filter i.e it will show only selected account's related contacts. It is working on standard record's detail page and on a custom vf page for a single record. But when i am using it in wrapper class then after selecting account in lookup field  contact lookup is not working even it is not opening popup window of lookup also. What could be the issue.

Please help me for this and let me know what i am missing.
I am using apex:repeat inside of a datatable/pageblocktable. Here is my code:

<apex:PageblockTable value="{!List}" var="fieldName"  cellPadding="4">
<apex:column value="{!fMap[fieldName]}" width="30"/>      
        <apex:repeat value="{!ListWrapCls}" var="acc">
                  <apex:column width="20">
                  <input type="radio" name="{!fieldName}" class="{!acc.Acct.id}" />
                 <apex:facet name="header" >
                           <apex:inputCheckbox value="{!acc.Bl}" title="{!acc.Acct.Name}"                                                       label="{!acc.Acct.Name}"/>
                </apex:facet>
                </apex:column>
        </apex:repeat>
</apex:PageblockTable>

how can i display radiobuttons inside of a repeat inside of a datatable/pageblocktable and maintain there values(true/false) using wrapper class?
Please help me regarding this.
I am using pahe block table and in this i am using :

<apex:repeat value="{!WrapCls}" var="obj">
            <apex:column width="20">
                    <apex:facet name="header" >
<apex:inputCheckbox value="{!obj.BoLn}" title="{!obj.Acct.Name}" label="{!obj.Acct.Name}"/>
                </apex:facet>
                                   {!obj.Acct.Name}    
            </apex:column>
</apex:repeat>

here in header checkbox is comming but its label is not comming.
What could be the issue, please help me regarding this.
From this url i got to know about salesforce's DescribeSObjectResult's property to use in apex.

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describesobjects_describesobjectresult.htm

i am using this code to get to know wheather i can write trigger on this object or not:-

SObjectType  objToken  =  Schema.getGlobalDescribe().get('contact');
DescribeSObjectResult  objDef  =  objToken.getDescribe();              
if( objDef.searchable)  //  it is working
if( objDef.triggerable)  // it is not working

here this objDef.triggerable is giving error. Let me know what i am missining in this code to use this property(triggerable).
I am implementing the same Salesforce to Salesforce automate record sharing with Apex Trigger for contact object and its related and master records.
I have did all prerequiste setting for this.

My trigger is firing(after insert, after update) and not giving any error but contact record is not sharing with other org.

Help me regarding it or let me know if i have left any action.
I am mentioning my code here:


Trigger AutoforwardContact on Contact(after Insert,after update){  
    PartnerNetworkConnection pp =[select Id, ConnectionStatus, ConnectionName from PartnerNetworkConnection
                                                               where ConnectionStatus = 'Accepted' and connectionName = '360DC'];
    system.debug('ppppp' + pp);
    Id networkId = pp.id;    
    System.debug('>>>>>>networkId' + networkId);
      
        List<PartnerNetworkRecordConnection> connections =  new    List<PartnerNetworkRecordConnection>();
        for (Contact newTest: Trigger.new) {                         
                PartnerNetworkRecordConnection newConnection = new PartnerNetworkRecordConnection(
                      ConnectionId = networkId,
                      LocalRecordId = newTest.Id,
                      SendClosedTasks = false,
                      SendOpenTasks = false,
                      SendEmails = false,
                      ParentRecordId = newTest.AccountId);
                System.debug('>>>>>>newConnection' + newConnection);   
                connections.add(newConnection);
            }
        database.insert(connections);  
}

Manuall sharing is working but whenever i try for automate using trigger it is not working.
I am implementing the same Salesforce to Salesforce automate record sharing with Apex Trigger for contact object and its related and master records.
I have did all prerequiste setting for this.

My trigger is firing(after insert, after update) and not giving any error but contact record is not sharing with other org.

Help me regarding it or let me know if i have left any action.
I am mentioning my code here:


Trigger AutoforwardContact on Contact(after Insert,after update){  
    PartnerNetworkConnection pp =[select Id, ConnectionStatus, ConnectionName from PartnerNetworkConnection
                                                               where ConnectionStatus = 'Accepted' and connectionName = '360DC'];
    system.debug('ppppp' + pp);
    Id networkId = pp.id;    
    System.debug('>>>>>>networkId' + networkId);
      
        List<PartnerNetworkRecordConnection> connections =  new    List<PartnerNetworkRecordConnection>();
        for (Contact newTest: Trigger.new) {                         
                PartnerNetworkRecordConnection newConnection = new PartnerNetworkRecordConnection(
                      ConnectionId = networkId,
                      LocalRecordId = newTest.Id,
                      SendClosedTasks = false,
                      SendOpenTasks = false,
                      SendEmails = false,
                      ParentRecordId = newTest.AccountId);
                System.debug('>>>>>>newConnection' + newConnection);   
                connections.add(newConnection);
            }
        database.insert(connections);  
}

Manuall sharing is working but whenever i try for automate using trigger it is not working.
I am using opportunity in wrapper class type list.
Here on opportunity i have 2 lookup 1 for account and 1 for contact. on contact lookup field i have apply filter i.e it will show only selected account's related contacts. It is working on standard record's detail page and on a custom vf page for a single record. But when i am using it in wrapper class then after selecting account in lookup field  contact lookup is not working even it is not opening popup window of lookup also. What could be the issue.

Please help me for this and let me know what i am missing.
I am implementing the same Salesforce to Salesforce automate record sharing with Apex Trigger for contact object and its related and master records.
I have did all prerequiste setting for this.

My trigger is firing(after insert, after update) and not giving any error but contact record is not sharing with other org.

Help me regarding it or let me know if i have left any action.
I am mentioning my code here:


Trigger AutoforwardContact on Contact(after Insert,after update){  
    PartnerNetworkConnection pp =[select Id, ConnectionStatus, ConnectionName from PartnerNetworkConnection
                                                               where ConnectionStatus = 'Accepted' and connectionName = '360DC'];
    system.debug('ppppp' + pp);
    Id networkId = pp.id;    
    System.debug('>>>>>>networkId' + networkId);
      
        List<PartnerNetworkRecordConnection> connections =  new    List<PartnerNetworkRecordConnection>();
        for (Contact newTest: Trigger.new) {                         
                PartnerNetworkRecordConnection newConnection = new PartnerNetworkRecordConnection(
                      ConnectionId = networkId,
                      LocalRecordId = newTest.Id,
                      SendClosedTasks = false,
                      SendOpenTasks = false,
                      SendEmails = false,
                      ParentRecordId = newTest.AccountId);
                System.debug('>>>>>>newConnection' + newConnection);   
                connections.add(newConnection);
            }
        database.insert(connections);  
}

Manuall sharing is working but whenever i try for automate using trigger it is not working.

Hi.


I have been working through this article which shows how to set up a Salesforce2Salesforce connection:

http://wiki.developerforce.com/index.php/An_Introduction_to_Salesforce_to_Salesforce

I have managed to set up the connection between the two installations but the code for the automation doesn't seem to work. 

What I want to be able to do is create an apex trigger on a custom object (myObject_c) which when created automatically puts the myObject_c and parent Account object across to the partner. My code looks like:

trigger shareWithPartner on myObject_c(after insert) {
PartnerNetworkRecordConnection newConnection =
                    new PartnerNetworkRecordConnection(
                        ConnectionId = networkId,
                        LocalRecordId = newContact.Id,
                        SendClosedTasks = false,
                        SendOpenTasks = false,
                        SendEmails = false,
                        ParentRecordId = myObject_c.AccountId);
insert newConnection;
}

but I get the error that networkId variable doesn't exist. Do I need to put in the connection id for the partner relationship in here? If I use the Id that is present in the url when I look at the connection:

https://na7.salesforce.com/p/pnetwork/Response/d?id=xyz123456789

in the code then I get the following errors:

                        ConnectionId = xyz123456789,
returns: Compile Error: expecting a right parentheses, found 'xyz123456789'