• Seb Ortiz
  • NEWBIE
  • 90 Points
  • Member since 2010


  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 23
    Replies
Thje jquery for onclick event doesn't work. The requirement is when i click on any hyperlink in the visualforce page, the alert message shld popup.


My Code:
<apex:page standardController="Core_Benefit__kav"  id="corebenefitpageid" applyBodyTag="false"  sidebar="false" showHeader="true" >
   
    <script>
    j$ = jQuery.noConflict();
    j$(document).ready(function() {
        j$('.openInPopup a').click(function(event) {
            alert( "Handler for .click() called." );
            event.preventDefault();
            window.open(j$(this).attr('href'));
        });
    });   
</script>
    <apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"/>
    
   
        <knowledge:articleRendererToolBar articleId="{! $CurrentPage.parameters.id}" id="toolbarid" canVote="true" showChatter="true"/><br/><br/>
        <apex:pageBlock mode="maindetail" id="pageblockid" >   
        <apex:tabPanel selectedTab="InformationTab" id="SingleTopicTabPanel"  tabClass="activeTab" inactiveTabClass="inactiveTab"  switchType="client">
                   
        <!-- INFORMATION TAB -->
            <apex:tab label="Information" name="Information" id="InformationTab" >
                <apex:pageBlockSection columns="1">
                    <apex:outputField id="exam" value="{!Core_Benefit__kav.Exam__c}"/>
                    <apex:outputField id="lens" value="{!Core_Benefit__kav.Lens__c}"/>
                    <apex:outputField id="lensenhancement" value="{!Core_Benefit__kav.Lens_Enhancements__c}"/>
                    <apex:outputField id="frame" value="{!Core_Benefit__kav.Frame__c}"/>
                    <apex:outputField id="contacts" value="{!Core_Benefit__kav.Contacts__c}"/>
                    <apex:outputField id="doctornetwork" value="{!Core_Benefit__kav.Doctor_Network__c}"/>
                    <apex:outputField id="lab" value="{!Core_Benefit__kav.Lab__c}"/>
                </apex:pageBlockSection>                   
            </apex:tab>
        <!-- ADDITIONAL BENEFITS TAB -->
            <apex:tab label="Additional Benefits" name="Additional Benefits" id="additionalbenefits" >
                <apex:pageBlockSection columns="1">
                    <apex:outputField id="additionalbenefits" value="{!Core_Benefit__kav.Additional_Benefits__c}"/>
                </apex:pageBlockSection>                        
            </apex:tab>   
        <!-- STEPS TAB -->              
            <apex:tab label="Additional Steps" name="Steps" id="StepTab" >
                <apex:pageBlockSection columns="1">
                    <apex:outputField id="adjustmentsteps" value="{!Core_Benefit__kav.Adjustment_Steps__c}"/>
                    <apex:outputField id="processingsteps" value="{!Core_Benefit__kav.Processing_Steps__c}"/>
                    <apex:outputField id="supportqueuesteps" value="{!Core_Benefit__kav.Support_Queue_Steps__c}"/>
                </apex:pageBlockSection>
            </apex:tab>
        </apex:tabPanel>
     
    <apex:iframe id="detailsframe"  width="100%" scrolling="true"/>
   
    </apex:pageBlock>  
</apex:page>
Hello,
I am getting the following error when trying to parse a WSDL and generate the relevant Apex classes in SalesForce:
 
"Error: Failed to parse wsdl: Found schema import from location https://*.xsd. External schema import not supported."
 
I believe that the following (edited) section of the WSDL referring to an external schema is what's causing the problem:
 
...

<wsdl:types>

<xs:schema>

<xs:import namespace="" schemaLocation="https://*.xsd"/>

</xs:schema>

<xs:schema>

<xs:import namespace="" schemaLocation="https://*.xsd"/>

</xs:schema>

</wsdl:types>

...

Can anyone confirm that this is in fact not allowed by Salesforce and if there is any remedy other than embedding the schema in the WSDL?

 
Thanks,
agab-
  • March 03, 2008
  • Like
  • 0
Hi all,

We are getting an URL_NOT_RESET error in REST API when trying to connect to a Production Org with *.cloudforce.com domain.
We are reproducing the same error when trying to connect with Data Loader, Workbench and Developer Console. It also happens in Developer Sandbox.

The Org has a My Domain set up, if that means anything

Steps to reproduce:
1. Login and get access_token
2. Call any API resource using the same domain returned in instance_url in step 1. i.e.
https://a33-3245.cloudforce.com/services/data/v29.0/sobjects/Account


Please help! it's critical

Thanks
Sebastian
Hi Folks,

If a string contains atleast one chinese character then i have return a boolean. I am looking for exact regular expression to use in pattern.matches method.

Any help much appreciated.
 
Hi,
I have a trigger and a class which implements a queueable interface.
When a record gets created the trigger invokes the queueable interface which will make a callout.

Now I'm writing the test class for the same.
In the test class I'm setting the mock response using httpMockCallout and inserting the record.
But I'm getting an exception, Callout loop not allowed.
Any Idea why this is happening?

As a workaround I set the response using test.Isrunningtest and it works fine.

Any pointers would be helpful.
Many Thanks
I have this trigger working fine in sandbox,however to push it into production I need to write a test class,I am a newbie and never written a test class prior. Can some one help me with this. Below is the trigger code. Thanks.trigger CampaignMember on CampaignMember (after insert, after update) {

    List<CampaignMember> memberList=[SELECT LeadId,CampaignId FROM CampaignMember WHERE ID IN:Trigger.new];


    Set<ID> leadIDs=new Set<ID>();
    Set<ID> campaignIDs=new Set<ID>();

    for(CampaignMember member:memberList)
    {
        leadIDs.add(member.LeadId);
        campaignIDs.add(member.CampaignId);
    }

    Map<Id,Lead> leadMap=new Map<Id,Lead>([SELECT Id,Recent_Campaign__c FROM Lead WHERE Id IN:leadIDs]);

    Map<Id,Campaign> campaignMap=new Map<Id,Campaign>([SELECT Id,Name FROM Campaign WHERE Id IN:campaignIDs]);

    if(Trigger.isAfter && Trigger.isInsert)
    {
        List<Lead> leadsToUpdate=new List<Lead>();    

        for(CampaignMember member:memberList)
        {
            Campaign campaign=campaignMap.get(member.CampaignId);
            Lead lead=leadMap.get(member.LeadId);
            lead.Recent_Campaign__c=campaign.Name;
            leadsToUpdate.add(lead);
        }

        update leadsToUpdate;           
    }

    if(Trigger.isAfter && Trigger.isUpdate)
    {
        List<Lead> leadsToUpdate=new List<Lead>();    

        for(CampaignMember member:memberList)
        {
            Campaign campaign=campaignMap.get(member.CampaignId);
            Lead lead=leadMap.get(member.LeadId);
            lead.Street=campaign.Name;
            leadsToUpdate.add(lead);
        }

        update leadsToUpdate;           
    }
}
Is there a way to restict the use of the SFDC Data Loader to certain instances or evironments?
Thje jquery for onclick event doesn't work. The requirement is when i click on any hyperlink in the visualforce page, the alert message shld popup.


My Code:
<apex:page standardController="Core_Benefit__kav"  id="corebenefitpageid" applyBodyTag="false"  sidebar="false" showHeader="true" >
   
    <script>
    j$ = jQuery.noConflict();
    j$(document).ready(function() {
        j$('.openInPopup a').click(function(event) {
            alert( "Handler for .click() called." );
            event.preventDefault();
            window.open(j$(this).attr('href'));
        });
    });   
</script>
    <apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"/>
    
   
        <knowledge:articleRendererToolBar articleId="{! $CurrentPage.parameters.id}" id="toolbarid" canVote="true" showChatter="true"/><br/><br/>
        <apex:pageBlock mode="maindetail" id="pageblockid" >   
        <apex:tabPanel selectedTab="InformationTab" id="SingleTopicTabPanel"  tabClass="activeTab" inactiveTabClass="inactiveTab"  switchType="client">
                   
        <!-- INFORMATION TAB -->
            <apex:tab label="Information" name="Information" id="InformationTab" >
                <apex:pageBlockSection columns="1">
                    <apex:outputField id="exam" value="{!Core_Benefit__kav.Exam__c}"/>
                    <apex:outputField id="lens" value="{!Core_Benefit__kav.Lens__c}"/>
                    <apex:outputField id="lensenhancement" value="{!Core_Benefit__kav.Lens_Enhancements__c}"/>
                    <apex:outputField id="frame" value="{!Core_Benefit__kav.Frame__c}"/>
                    <apex:outputField id="contacts" value="{!Core_Benefit__kav.Contacts__c}"/>
                    <apex:outputField id="doctornetwork" value="{!Core_Benefit__kav.Doctor_Network__c}"/>
                    <apex:outputField id="lab" value="{!Core_Benefit__kav.Lab__c}"/>
                </apex:pageBlockSection>                   
            </apex:tab>
        <!-- ADDITIONAL BENEFITS TAB -->
            <apex:tab label="Additional Benefits" name="Additional Benefits" id="additionalbenefits" >
                <apex:pageBlockSection columns="1">
                    <apex:outputField id="additionalbenefits" value="{!Core_Benefit__kav.Additional_Benefits__c}"/>
                </apex:pageBlockSection>                        
            </apex:tab>   
        <!-- STEPS TAB -->              
            <apex:tab label="Additional Steps" name="Steps" id="StepTab" >
                <apex:pageBlockSection columns="1">
                    <apex:outputField id="adjustmentsteps" value="{!Core_Benefit__kav.Adjustment_Steps__c}"/>
                    <apex:outputField id="processingsteps" value="{!Core_Benefit__kav.Processing_Steps__c}"/>
                    <apex:outputField id="supportqueuesteps" value="{!Core_Benefit__kav.Support_Queue_Steps__c}"/>
                </apex:pageBlockSection>
            </apex:tab>
        </apex:tabPanel>
     
    <apex:iframe id="detailsframe"  width="100%" scrolling="true"/>
   
    </apex:pageBlock>  
</apex:page>
Hi all,

We are getting an URL_NOT_RESET error in REST API when trying to connect to a Production Org with *.cloudforce.com domain.
We are reproducing the same error when trying to connect with Data Loader, Workbench and Developer Console. It also happens in Developer Sandbox.

The Org has a My Domain set up, if that means anything

Steps to reproduce:
1. Login and get access_token
2. Call any API resource using the same domain returned in instance_url in step 1. i.e.
https://a33-3245.cloudforce.com/services/data/v29.0/sobjects/Account


Please help! it's critical

Thanks
Sebastian

I'm trying to upload photo using chatter rest api, and its working great for test.salesforce.com and login.salesforce.com.

 

I'm able to login using OAUTH, do get in response instance_url, acess_token etc, and I set the instance_url in my photo upload request and its works great only when my instance_url is a nxxx.salesforce.com or c**.salesforce.com (ie it works for valid salesforce production and sandbox instances).

 

However when I try to login against *.cloudforce.com (a salesforce org), login is successful, instance_url returned is xxx.cloudforce.com, but when I use that instance url for photo upload request its says "Destination URL not reset". Is it something to do with this exception type org of *.cloudforce.com ? 

I have the following VF page that is called by a button on a Person Account record.

 

 

<apex:page standardController="Account" title="Cancel Account">
    <apex:sectionHeader title="Cancel Account"/>
    <apex:form id="theForm">
        <apex:pageBlock id="theBlock">
            <apex:pageBlockSection id="sectionOne">
                <apex:outputField value="{!Account.Name}" />
                <!-- Bound to Date Field -->                
                <apex:inputField value="{!Account.Account_Cancel_Eff_Date__c}" />
                <!-- Bound to Picklist -->
                <apex:inputField value="{!Account.Account_Cancel_Reason__c}" />
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

When the page is called for a person account, Salesforce returns:

 

Validation Errors While Saving Record(s)

There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Record Type ID: value not valid for the entity: Account". 

When the page is called for a normal Account, it renders as expected. If I remove the inputField that is bound to the picklist, then call the page for a person account, everything works as expected. What's going on here?

 

  • February 09, 2011
  • Like
  • 0
Hello All,

I have used a checkbox with some button. The button is disabled by default. when the checkbox is checked it should be enabled. otherwise not. i am facing some problems you may help me. Its really urgent.

I am attaching the code


<apex:page >
<script type="text/javascript">
   
    function enable(checkbox, btn){
        if(checkbox.checked){
            document.getElementById(btn).disabled = false;
         
        }else{
            document.getElementById(btn).disabled = true;
        }
    }

</script>
<apex:form id="myForm">

  <h1>Congratulation</h1>This is your new Page
    <apex:pageBlock >
            <apex:inputCheckbox id="chk" onclick="enable(this,'{!$Component.pageblock.btn}');">
        </apex:inputCheckbox>
        <apex:pageblockButtons id="pageblock" location="bottom">
            <apex:commandButton value="OK" id="btn" disabled = "true">
            </apex:commandButton>
        </apex:pageblockButtons>
       
       
    </apex:pageBlock>  
</apex:form>
</apex:page>
  • December 02, 2008
  • Like
  • 0
Hi,
 
I want to create the functionality "Find Duplicate" as is avaialable in Lead for Person Accounts. The button will be on the Page layout of the Account page and will be available only for Person Accounts.
The functionaly needs to be developed in Visual Force and Apex. Can I use the apex merge call in an apex class. Will this be a better idea to create this in apex rather than as an S-Control. Has anybody tried this or has some piece of code that can get me working
 
would be grateful
Thanks
Get following error when generate apex class from wsdl file. Could anyone please help provide some insight? Thanks!
 
The following generated class(es) have compilation errors:
Error: inthubCrmserviceWsdl
Error: Dependent class is invalid and needs recompilation:
inthubCrmserviceTypes: line 34, column 18: inthubCrmserviceTypes.IntHubException: Exception class must extend another Exception class at 12:13
 
//Generated by wsdl2apex
public class inthubCrmserviceWsdl {
    public class CrmProcessorPort {
        public String endpoint_x = 'http://dapp1:57050//CRMService';
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        private String[] ns_map_type_info = new String[]{'http://inthub.prod.netsol.com/CRMService/wsdl', 'inthubCrmserviceWsdl', 'http://inthub.prod.netsol.com/CRMService/types', 'inthubCrmserviceTypes'};
        public void submitForm(inthubCrmserviceTypes.Credential Credential_1,inthubCrmserviceTypes.FormRequest FormRequest_2) {
            inthubCrmserviceTypes.submitForm request_x = new inthubCrmserviceTypes.submitForm();
            inthubCrmserviceTypes.submitFormResponse response_x;
            request_x.Credential_1 = Credential_1;
            request_x.FormRequest_2 = FormRequest_2;
            Map<String, inthubCrmserviceTypes.submitFormResponse> response_map_x = new Map<String, inthubCrmserviceTypes.submitFormResponse>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              '',
              'http://inthub.prod.netsol.com/CRMService/types',
              'submitForm',
              'http://inthub.prod.netsol.com/CRMService/types',
              'submitFormResponse',
              'inthubCrmserviceTypes.submitFormResponse'}
            );
            response_x = response_map_x.get('response_x');
        }
    }
}

Error: inthubCrmserviceTypes
Error: inthubCrmserviceTypes.IntHubException: Exception class must extend another Exception class at 34:18
//Generated by wsdl2apex
public class inthubCrmserviceTypes {
    public class submitForm {
        public inthubCrmserviceTypes.Credential Credential_1;
        public inthubCrmserviceTypes.FormRequest FormRequest_2;
        private String[] Credential_1_type_info = new String[]{'Credential_1','http://inthub.prod.netsol.com/CRMService/types','Credential','1','1','true'};
        private String[] FormRequest_2_type_info = new String[]{'FormRequest_2','http://inthub.prod.netsol.com/CRMService/types','FormRequest','1','1','true'};
        private String[] apex_schema_type_info = new String[]{'http://inthub.prod.netsol.com/CRMService/types','false'};
        private String[] field_order_type_info = new String[]{'Credential_1','FormRequest_2'};
    }
    public class Credential {
        public String password;
        public String userName;
        private String[] password_type_info = new String[]{'password','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] userName_type_info = new String[]{'userName','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] apex_schema_type_info = new String[]{'http://inthub.prod.netsol.com/CRMService/types','false'};
        private String[] field_order_type_info = new String[]{'password','userName'};
    }
    public class FormRequest {
        public String action;
        public String clientRef;
        public inthubCrmserviceTypes.FormData[] formData;
        public String productInstanceId;
        public String webformInstanceId;
        private String[] action_type_info = new String[]{'action','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] clientRef_type_info = new String[]{'clientRef','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] formData_type_info = new String[]{'formData','http://inthub.prod.netsol.com/CRMService/types','FormData','0','-1','true'};
        private String[] productInstanceId_type_info = new String[]{'productInstanceId','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] webformInstanceId_type_info = new String[]{'webformInstanceId','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] apex_schema_type_info = new String[]{'http://inthub.prod.netsol.com/CRMService/types','false'};
        private String[] field_order_type_info = new String[]{'action','clientRef','formData','productInstanceId','webformInstanceId'};
    }
    public class IntHubException {
        public Integer errorCode;
        public String vendorErrorCode;
        public String vendorErrorMessage;
        public String message;
        private String[] errorCode_type_info = new String[]{'errorCode','http://www.w3.org/2001/XMLSchema','int','1','1','false'};
        private String[] vendorErrorCode_type_info = new String[]{'vendorErrorCode','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] vendorErrorMessage_type_info = new String[]{'vendorErrorMessage','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] message_type_info = new String[]{'message','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] apex_schema_type_info = new String[]{'http://inthub.prod.netsol.com/CRMService/types','false'};
        private String[] field_order_type_info = new String[]{'errorCode','vendorErrorCode','vendorErrorMessage','message'};
    }
    public class submitFormResponse {
        private String[] apex_schema_type_info = new String[]{'http://inthub.prod.netsol.com/CRMService/types','false'};
        private String[] field_order_type_info = new String[]{};
    }
    public class FormData {
        public String answer;
        public String name;
        public String question;
        private String[] answer_type_info = new String[]{'answer','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] name_type_info = new String[]{'name','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] question_type_info = new String[]{'question','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] apex_schema_type_info = new String[]{'http://inthub.prod.netsol.com/CRMService/types','false'};
        private String[] field_order_type_info = new String[]{'answer','name','question'};
    }
}

There are a couple things I need to understand about this limit, and I can't find the answers anywere.

 

1. Do workflow Outbound Messages count against the daily mass email limit, or does it only apply to messages sent to leads/contacts?

 

2. What happens to emails sent after the initial 500? Are they dropped or queued until the next day?

 

 

  • May 19, 2008
  • Like
  • 0
Hello,
I am getting the following error when trying to parse a WSDL and generate the relevant Apex classes in SalesForce:
 
"Error: Failed to parse wsdl: Found schema import from location https://*.xsd. External schema import not supported."
 
I believe that the following (edited) section of the WSDL referring to an external schema is what's causing the problem:
 
...

<wsdl:types>

<xs:schema>

<xs:import namespace="" schemaLocation="https://*.xsd"/>

</xs:schema>

<xs:schema>

<xs:import namespace="" schemaLocation="https://*.xsd"/>

</xs:schema>

</wsdl:types>

...

Can anyone confirm that this is in fact not allowed by Salesforce and if there is any remedy other than embedding the schema in the WSDL?

 
Thanks,
agab-
  • March 03, 2008
  • Like
  • 0