• stripathy
  • NEWBIE
  • 25 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 8
    Replies

All,

I can not figure out how to do this and must be missing something simple.  If I setup a ListMetadataQuery and just set the type to "Report" I get nothing in return.  If I set the folder to null or "" I still get nothing in return.  If I set the Type to "Report" and set the folder to a folder with in the org then I get all the reports from that folder, which is expected.  What I need to know is, is there a way to get a list of folders for reports?  Or is there a way to list all the reports regardless of folder? Thanks in advance for any help. 

 

Regards,

Max

I have pretty simple code which was working on an older sandbox, when i migrate to a new one, nothing happens when i click on other tabs.

<apex:page standardcontroller="Opportunity" extensions="ExtendedSalesProcess">

 <style>
      .activeTab {background-color: #236FBD; color:white; 
         background-image:none}
      .inactiveTab { background-color: lightgrey; color:black; 
         background-image:none}
   </style>
   <apex:tabPanel switchType="set" selectedTab="tabdetails" 
                  id="AccountTabPanel" tabClass="activeTab" 
                  inactiveTabClass="inactiveTab">   
      
      <apex:tab label="Solution Mapping" name="AccDetails1" id="tabdetails1">
      <apex:include pageName="OpportunityDealSummary"/>
      </apex:tab>
      <apex:tab label="Tech Plan" name="AccDetails2" id="tabdetails2">
      <apex:include pageName="OpportunitySE"/>
      </apex:tab>
       <apex:tab label="Lead" name="LeadDetails3" id="tabdetails3">
       <apex:include pageName="OpportunityLead" rendered="true"/> 
       </apex:tab>
      <apex:tab label="Competitor Intelligence" name="AccDetails4" id="tabdetails4">
      <apex:include pageName="OpportunityCompetitor"/>
      </apex:tab>

      <apex:tab label="Notes and Attachments" 
                name="NotesAndAttachments" id="tabNoteAtt">
         <apex:relatedList subject="{!opportunity}" 
                           list="CombinedAttachments" />
      </apex:tab>
     
       </apex:tabPanel>
</apex:page>

Hi all,

 

We are  integrating TIBCO with SFDC through partner WSDL. While calling the update operation, we receive this exception in response. Anybody has any clue?

 

=============================================================================================

caused by: org.xml.sax.SAXException: validation error: unexpected content "Header.LimitInfoHeader"; expected "Header.DebuggingInfo"   ({com.tibco.xml.validation}COMPLEX_E_UNEXPECTED_CONTENT) at /outputMessage[1]/headers[1]/Header.LimitInfoHeader[1]

com.tibco.xml.validation.exception.UnexpectedElementException: unexpected content "Header.LimitInfoHeader"; expected "Header.DebuggingInfo"

                at com.tibco.xml.validation.state.a.c.a(CMElementValidationState.java:476)

=============================================================================================

 

Need some guidelines on what is the best way to send data out of SFDC to outside systems?

Can outbound message handle sending date for more than one object together e.g. master detail objects?

For those scenarios is it better to call a webservice from trigger?

I need some guidelines on what is the best way to send data out of SFDC to outside systems?

Can outbound message handle sending date for more than one object together e.g. master detail objects?

For those scenarios is it better to call a webservice from trigger?

I am trying to auto sync a child record which is a child of account. I am getting this error, though the account is getting synced properly. I have written a trigger on the child object. Code given below. Any suggestions how to fix this?

 

trigger AdressS2s on Address_vod__c (after insert, after update) {


// Define connection id
Id networkId = ConnectionHelper.getConnectionId('sss');

Set<Id> localAddressAccountSet = new Set<Id>();
List<Address_vod__c> localAddress_vod_cs = new List<Address_vod__c>();
Set<Id> sharedAccountSet = new Set<Id>();

// only share records created in this org, do not add contacts received from another org.

for (Address_vod__c newAddress_vod_c: TRIGGER.new) {

localAddress_vod_cs.add(newAddress_vod_c);

}



System.debug('Inside address trigger -->');
//if (sharedAccountSet.size() > 0) {
List<PartnerNetworkRecordConnection> Address_vod_cConnections = new List<PartnerNetworkRecordConnection>();

for (Address_vod__c newAddress_vod_c: localAddress_vod_cs) {

// if (sharedAccountSet.contains(newAddress_vod_c.Account_vod__c)) {

System.debug('Inside address trigger final loop -->'+ newAddress_vod_c);

PartnerNetworkRecordConnection newConnection =
new PartnerNetworkRecordConnection(
ConnectionId = networkId,
LocalRecordId = newAddress_vod_c.Id,
SendClosedTasks = false,
SendOpenTasks = false,
SendEmails = false,
ParentRecordId = newAddress_vod_c.Account_vod__c);

Address_vod_cConnections.add(newConnection);

//}
}

if (Address_vod_cConnections.size() > 0 ) {
System.debug('Size greater than 0 -->'+ Address_vod_cConnections);
try{
database.insert(Address_vod_cConnections);
}
Catch(exception ex){
System.debug('exception in sending'+ex.getmessage());
}

}

}


//}

I am trying to export my project in eclipse ide and then reimport in another machine to make sure my package works fine for deployment. But this does not look like it works, since after importing it is not able to refresh the project successfully and also if you go to Add/Remove metadata it does not show any files even though all files are present in the project and package.xml contains all the correct tags. Anybody faced same issue?

I am trying to export my project in eclipse ide and then reimport in another machine to make sure my package works fine for deployment. But this does not look like it works, since after importing it is not able to refresh the project successfully and also if you go to Add/Remove metadata it does not show any files even though all files are present in the project and package.xml contains all the correct tags. Anybody faced same issue?

 

Hi,
I have 2 custom objects maproducts and macontacts. Since the macontacts can be of 3 different types like (prod, lead and marketing), I created many to many relation ship between the two custom objects using junction objects. Now the problem is I am not able to get a single report where i can get columns as maproduct, and 3 columns showing contact names for prod, lead and marketing contacts. Is it possible or the approach to solve the problem is wrong?

Hi,I have 2 custom objects maproducts and macontacts. Since the macontacts can be of 3 different types like (prod, lead and marketing), I created many to many relation ship between the two custom objects using junction objects. Now the problem is I am not able to get a single report where i can get columns as maproduct, and 3 columns showing contact names for prod, lead and marketing contacts. Is it possible or the approach to solve the problem is wrong?

 

Hi ,

 

I have a junction object which is having master child relationship with two other objects. Master objects are custom products and custom contacts. I have created junction object since the relationship is one product can have multiple contacts and vice versa. From my custom contact related list on custom product page, when I go to create a link for adding a few more contacts to the same product, I dont want the product name to be editable and it should be greyed out. Any ideas for doing the same? Is a new VF page only option?

 

Thanks,

San.

Hi,
I need to implement a multi select picklist in a custom object. But I have records which are more than 40 characters. Any ideas to get over this?
Thanks,
Santosh.

Hi,

 

I am trying to upload data into a custom object one field of which is a look up to "Contact". I need to check if the current custom object record has a similar Contact record and need to tie it as a parent Contact record. Is it possible to do through dataloader or I need to write custom code in .NET to call APIs to achieve this functionality?

 

Thanks,

Santosh.

Hi,

 

I am facing one issue where in if I try to create users using .NET and salesforce APIs, and if multiple persons use the same program it gives them a session invalid.

 

Do I need to use loginAsync instead of login?

 

Any ideas or sample code?

 

Thanks,

Santosh

Hi all,

 

We are  integrating TIBCO with SFDC through partner WSDL. While calling the update operation, we receive this exception in response. Anybody has any clue?

 

=============================================================================================

caused by: org.xml.sax.SAXException: validation error: unexpected content "Header.LimitInfoHeader"; expected "Header.DebuggingInfo"   ({com.tibco.xml.validation}COMPLEX_E_UNEXPECTED_CONTENT) at /outputMessage[1]/headers[1]/Header.LimitInfoHeader[1]

com.tibco.xml.validation.exception.UnexpectedElementException: unexpected content "Header.LimitInfoHeader"; expected "Header.DebuggingInfo"

                at com.tibco.xml.validation.state.a.c.a(CMElementValidationState.java:476)

=============================================================================================

 

I am trying to use a TabPanel within a custom Visualforce page with a custom controller.

 

The Tabs are rendering in the page, but they are not clickable and when I set the default selected tab to something other than the "tab1" it never renders with that tab selected.   Only "tab1" renders as selected even if selectedTab="tab2".

 

Do "apex:tabPanel"'s only work on Visualforce pages with Standard Controllers?  Or is there something I need to implement in my controller to enable things?

 

I am using some basic example code like below:

 

<style>

      .activeTab {background-color: #236FBD; color:white

         background-image:none}

      .inactiveTab { background-color: lightgrey; color:black

         background-image:none}

   </style>

   <apex:tabPanel switchType="client" selectedTab="tab1" 

                  id="MyTabPanel"tabClass="activeTab" 

                  inactiveTabClass="inactiveTab">   

      <apex:tab label="Some Tab" name="Some Tab" id="tab1">

         Some Content Tab1

      </apex:tab>

      <apex:tab label="Some Other Tab" name="Some Other Tab" id="tab2">

         Some Content Tab2

      </apex:tab>

   </apex:tabPanel>

 

 

 

 

thanks in advance!

  • January 29, 2013
  • Like
  • 0

I am trying to auto sync a child record which is a child of account. I am getting this error, though the account is getting synced properly. I have written a trigger on the child object. Code given below. Any suggestions how to fix this?

 

trigger AdressS2s on Address_vod__c (after insert, after update) {


// Define connection id
Id networkId = ConnectionHelper.getConnectionId('sss');

Set<Id> localAddressAccountSet = new Set<Id>();
List<Address_vod__c> localAddress_vod_cs = new List<Address_vod__c>();
Set<Id> sharedAccountSet = new Set<Id>();

// only share records created in this org, do not add contacts received from another org.

for (Address_vod__c newAddress_vod_c: TRIGGER.new) {

localAddress_vod_cs.add(newAddress_vod_c);

}



System.debug('Inside address trigger -->');
//if (sharedAccountSet.size() > 0) {
List<PartnerNetworkRecordConnection> Address_vod_cConnections = new List<PartnerNetworkRecordConnection>();

for (Address_vod__c newAddress_vod_c: localAddress_vod_cs) {

// if (sharedAccountSet.contains(newAddress_vod_c.Account_vod__c)) {

System.debug('Inside address trigger final loop -->'+ newAddress_vod_c);

PartnerNetworkRecordConnection newConnection =
new PartnerNetworkRecordConnection(
ConnectionId = networkId,
LocalRecordId = newAddress_vod_c.Id,
SendClosedTasks = false,
SendOpenTasks = false,
SendEmails = false,
ParentRecordId = newAddress_vod_c.Account_vod__c);

Address_vod_cConnections.add(newConnection);

//}
}

if (Address_vod_cConnections.size() > 0 ) {
System.debug('Size greater than 0 -->'+ Address_vod_cConnections);
try{
database.insert(Address_vod_cConnections);
}
Catch(exception ex){
System.debug('exception in sending'+ex.getmessage());
}

}

}


//}

All,

I can not figure out how to do this and must be missing something simple.  If I setup a ListMetadataQuery and just set the type to "Report" I get nothing in return.  If I set the folder to null or "" I still get nothing in return.  If I set the Type to "Report" and set the folder to a folder with in the org then I get all the reports from that folder, which is expected.  What I need to know is, is there a way to get a list of folders for reports?  Or is there a way to list all the reports regardless of folder? Thanks in advance for any help. 

 

Regards,

Max

The following code is somehow causing an Internal Server Error at runtime, and is now preventing the VisualForce from successfull compiling:

 

<apex:outputText rendered="{!(pageCategories.size > 0)}">

 

Error: siteContent line 780, column 14: The value of attribute "rendered" associated with an element type "apex:outputText" must not contain the '<' character.

 

The variable 'pageCategories' is a List, and I am rendering this element only if the list size is greater than 0.  I realize there are other ways to achieve this, but this code has been in place since Winter '11, and only stopped working after the Winter '12 upgrade.  I would like to get to the root cause of this.

 

 

Thanks in advance for your insight.

 

 

Mike

 


When I'm using the Force.com console I get the following error every now and again:

 

Response to EXEC to /_ui/common/apex/debug/ApexCSIAPI was : -1, transaction aborted

 

The code usually executes ok and the transaction doesn't seem to abort (I'm assuming when it says abort it aborts the entire transaction). Also then when I try to double click on one of the debug statements in the console, to see what it says it keeps saying USER_DEBUG undefined. Which I'm sure it didn't do before the org was upgraded to Winter 12? maybe just me.

 

How can you find out why the transaction was aborted when there are no errors in the log?

 



 

 

  • October 10, 2011
  • Like
  • 0

Hi,
I need to implement a multi select picklist in a custom object. But I have records which are more than 40 characters. Any ideas to get over this?
Thanks,
Santosh.

 I'm getting the same error both in the test class and while inserting a record from the user interface:

 

System.DmlException: Insert failed. First exception on row 0; first error: INVALID_PARTNER_NETWORK_STATUS, invalid status for partner network operation

 

The trigger is to forward custom object SSV to a connection on insert. The connection is found on related object. It has "aceepted" status and the SSV is published and subscribed. The test class queries the data base for an accepted connection so it cannot have other status. I also checked the status in the date base, querying by the connectionId and it is for sure accepted.

 

What's more interested the behaviour had been already tested and the error didn't occur before.

 

The trigger is:

 

    List<String> SSV_ID = new LIst<String>();
    List<SSV__c> visits = new List<SSV__c>();

   
   
   
    for (SSV__c ssv: trigger.new)   {
        SSV_ID.add(ssv.id);
    }
   
    visits = [select id, Case__r.Network__c, case__r.Network__r.Organizer__c, case__r.Network__r.Member__c,
            Landmark__c, case__r.Network__r.Organizer__r.BAW__c, case__r.Network__r.Organizer__r.AAW__c,
            Visit_Start__c, Visit_End__c from SSV__C where id in: SSV_ID];
   
    system.debug('ssv, i.e. visits: ' + visits.size());
   
    if (trigger.isInsert) {
       
        List<String> accid = new List<String>(); //related accounts id
        Map<String, String> SSVAccount = new Map<String, String>();
        Map<String, String> AccountSSV = new Map<String, String>();
        List<VSV__c> RelatedVSV = new List<VSV__c>();

       
        //RelatedVSV = [select id, SSV__c from VSV__c where SSV__c in: SSV_ID for update];
       
        system.debug('Organizer ' + visits[0].case__r.Network__r.Organizer__c);
   
        for (SSV__c v: visits) {
            accid.add(v.case__r.Network__r.Organizer__c);
            SSVAccount.put(v.id, v.case__r.Network__r.Organizer__c);
            AccountSSV.put(v.case__r.Network__r.Organizer__c, v.id);
        }
    
   
        List<PartnerNetworkConnection> connections = new List<PartnerNetworkConnection>();
       
        connections = [select Id, ConnectionStatus, AccountId, ConnectionName from PartnerNetworkConnection
        where AccountId in: accid];
       
        if (connections.size()<1) {
            for (SSV__c ssv: trigger.new)   {
                ssv.adderror('No S2S connection found to the related Organizer. Please, establish connection, publish necessary data and try again!');
            }
        } else {
            system.debug('Jestem w else');
            List<PartnerNetworkRecordConnection> forwardedSSV = new List<PartnerNetworkRecordConnection>();
            List<SSV__c> VIS = new List<SSV__c>();
           
            for(PartnerNetworkConnection network : connections) { //for All partner accounts whose SSVs have been modified
                PartnerNetworkRecordConnection newrecord = new PartnerNetworkRecordConnection();
                system.debug('network.id: ' +network.id);
               
               
                newrecord.ConnectionId = network.Id;   
               
                system.debug('partner network status is: ' +network.ConnectionStatus);
                system.debug('parnter connection name ' + network.connectionName);
              
                for (SSV__c v: trigger.new) {
                    if (network.AccountId == SSVAccount.get(v.id)) {
                        if (network.connectionStatus!='Accepted') {
                            v.adderror('No accepted connection found to the related Organizer. Please, establish connection, publish necessary data and try again');
                        } else {
                            VIS.add(v); // only SSV under current AccountId
                        }
                       
                    }
                }
               
                for (SSV__c v1 : VIS) {
                    newrecord.LocalRecordId = v1.id;
                    newrecord.SendEmails = true;
                    //newrecord.RelatedRecords = 'VSV__c';
                    forwardedSSV.add(newrecord);
                }
            }
                   
            try {          
                insert forwardedSSV;
            } catch (exception e) {
                for (SSV__c s: trigger.new) {
                    //s.adderror('The record(s) cannot be saved! Please check that the SSV is published to the related account and subscribed by it.');
                    system.debug('Im the error: ' +e);
                    system.debug('forwardedSSV[0].ConnectionId: ' +forwardedSSV[0].ConnectionId);
                }
               
            }

        }

 

 

 ------------The test method is:--------------

 

 static testMethod void test_ssvCreate() {
        
        Account a = new Account(Name = 'Test');
        
        Account org2 = new Account(Name = 'ABC', BAW__c =120, AAW__c=60 );
        
        //Test.startTest();
        List<PartnerNetworkConnection> connections = [select id, AccountId, ConnectionStatus
            from PartnerNetworkConnection where  (connectionStatus='Accepted' and AccountId!=null)];

        
        system.debug('connection ' + connections.size());
        
        if (connections.size()>0) {
        
            Account organizer = [select id, name from Account where id = :connections[0].AccountId];
            
            system.debug('organizer name ' + organizer.name);
            
            if (organizer!=null) {
                
            
                Account member = new Account(
                    Name = 'member1');
                
                insert member;
                
                
                Network__c n = new Network__c(
                    Organizer__c = organizer.id,
                    Member__c = member.id);
                    
                insert n;
                
                system.debug('Organizer on the network ' + n.Organizer__c);
                
                Case c = new Case(
                    Status ='New',
                    Origin = 'Phone',
                    Network_ID__c = n.id,
                    Ext_Contact_ID__c = '123c',
                    Ext_Account_ID__c = '456a');
                
                insert c;
                
                Case testc = [select id, Network__c, Network__r.Organizer__c from case where id= : c.id];
                
                system.debug('case id ' + c.id);
                system.debug('Network on the case ' + c.Network__c);
                system.debug('Organizer on the case ' + testc.Network__r.Organizer__c);
                
                Landmark__c l = new Landmark__c(
                    Name = 'test',
                    countrycode__c = 'pl',
                    DisplayName__c = 'displaytest',
                    Account__c = Member.id);
                
                insert l;
                
                SSV__c s1 = new SSV__c(
                    Visit_Start__c = datetime.now(),
                    Visit_End__c = datetime.now(),
                    Case__c = c.id,
                    Landmark__c = l.id
                    );
                
                insert s1;
               

 

 

 

 --------- The test result is: ------------------------

 

 

20090921204715.339:Trigger.SSV_share: line 58, column 17: network.id: 04P800000009ZtCEAU
20090921204715.339:Trigger.SSV_share: line 63, column 17: partner network status is: Accepted
20090921204715.339:Trigger.SSV_share: line 64, column 17: parnter connection name ABC Manufacturing Corporation
20090921204715.339:Trigger.SSV_share: line 66, column 17: SelectLoop:LIST:SOBJECT:SSV__c
20090921204715.339:Trigger.SSV_share: line 77, column 17: SelectLoop:LIST:SOBJECT:SSV__c
20090921204715.339:Trigger.SSV_share: line 86, column 17: Insert: LIST:SOBJECT:PartnerNetworkRecordConnection
20090921204715.339:Trigger.SSV_share: line 86, column 17: DML Operation executed in 38 ms
20090921204715.339:Trigger.SSV_share: line 88, column 14: SelectLoop:LIST:SOBJECT:SSV__c
20090921204715.339:Trigger.SSV_share: line 90, column 18: Im the error: System.DmlException: Insert failed. First exception on row 0; first error: INVALID_PARTNER_NETWORK_STATUS, invalid status for partner network operation
20090921204715.339:Trigger.SSV_share: line 91, column 18: forwardedSSV[0].ConnectionId: 04P800000009ZtCEAU

  • September 21, 2009
  • Like
  • 0