• lakshmi.sf9
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 10
    Replies

Hi,

I am doing the integration between salesforce to UI (Jquery). When I hit the url in web browser and send the call out to salesforce I am getting the below error.
https://xxxxxxxxxxxxx/services/apexrest/CreateCase. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://xxxxxxxxxxxxx' is therefore not allowed access. The response had HTTP status code 401.
In salesforce I added the url in remote site settings and in CORS whie list.
From UI part in Jquery enabled cors. From SOAP UI Toll I was able to send call out and get the response.
But from original server I am facing the above error.
Is there any settings missed in salesforce or jquery.

This is critical to me. Please any one suggest me.

I appreciate the help to resolve this issue.

Thanks in advance,
Lakshmi

 

 

Hi,

Can any one suggest me how to send outbound message from one salesforce org to another salesforce org.
Please mention the steps.
I need out put in the salesforce org.
I was able to see the result in http://requestb.in/ but I want see the result in salesforce org.

Thanks,
Lakshmi
Hi,

I have written one rest api class.Other server using the jquery hitting the salesforce and they are facing the issue with the following error

XMLHttpRequest cannot load https://cs36.salesforce.com/services/oauth2/token?grant_type=----&client_secret=-----. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://localhost:9084' is therefore not allowed access.

From tool it is working fine.This is rest api in between salesforce and UI

 I tested my class form other salesforce org its working fine.I added their server url in remote site settings as well as in CORS.Please any one suggest me on this issue.Its urgent to me.

Thanks in advance,
lakshmi
Hi,

I executed batch class and it is executed 60,000 records,batch size is 2 ,So 30,000 logs get created.I want to test it again.
Not able to clear the logs all becuase it is taking more time.
I deleted monitor user and again created user and even I opened the instace with other user in seperate browser still logs are showing.
Can any one suggest me how to delete these debug logs.

Thanks in advance,

 
Hi,

I created multi level approval process.Suppose If A is approved then B needs to approved.If B is Approved then C needs to approved.Till the time records has to be unlocked.I made it for 3 users profile API Enabled is true.And in workfflow & Approval Settings 'Enable Email Approval Response' is also checked.But when I approve from email each level Email Service address is not coming automatically.Every time i dont wnat to copy reply-To address in the email status bar.Some times it is coimng automatically and some times it is not coimng automatically..

Its urgent..

Thanks in advance,




 
Hi,

Can any one please tell how can we change pageblocksection background color.

I am trying the below code.It is not working

<apex:page standardController="Account">
<style>
.panelWrapper {
    background-color: green;
}
</style>
<apex:outputPanel styleClass="panelWrapper" layout="block">
    <apex:pageBlock title="Hello">
        <apex:pageBlockSection title="pageblocksectionName">
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:outputPanel>
</apex:page>

Thanks in advance
Hi,

I am writing in component  as -- this is in outputmode.

<apex:outputText label="Comment" value="{!ECSQ.Comment}" rendered="{!ECSQ.Comment!=''}"  />

In input mode this is <apex:inputTextArea value="{!ECSQ.Comment}" cols="80" rows="10">

I am entering in input data as  with line breaks

"testtesttest

test11111

test2222"

output is "testtesttest test11111 test2222"

actually line breaks will come in apex:outputField.
But in my case if I give outputFiled I will get error as

"Could not resolve the entity from <apex:outputField> value binding '{!ECSQ.Comment}'. <apex:outputField> can only be used with SObjects, or objects that are Visualforce field component resolvable."

Here ECSQ is component attribute.

I need to use string values in outputTex field and line breaks is also required.

Please help me on this
Hi,

Can one help me how to enable spell check for richtextArea in VF Page..

Thanks,
Hi,

I have 3 tabs in tab panel.and each tab is having next and previous buttons.If we click on next button on third tab it has to go for another outputpanel i.e overview.
And each button I need rerender functionalities.In each button if user close the window I need to show some confiramtion alert box..But in my code it is working for only first tab.

Can any one please help me..I need confiramtion alertbox on 3 buttons and overview section.

Here is my code :

VF Page :

<apex:page id="pageId" Controller="aaa">
<apex:includeScript value="{!$Resource.Jquery1}"/>
<apex:includeScript value="{!URLFOR($Resource.Jquery1)}" />
<script>
var j$ = jQuery.noConflict();
var tempDisableBeforeUnload = false;

j$(window).on('beforeunload', function()
{
   if (!tempDisableBeforeUnload)
   {
      return 'Leaving this page will lose your changes. Are you sure?';
   }
   else
   {
      //reset
      tempDisableBeforeUnload = false;
      return null;
   }
});
</script>
    <apex:outputpanel rendered="{!NOT(display)}" >
    <apex:form Id="FormId">
    <apex:pageMessages id="MainPageMsg"/>
        <apex:tabPanel selectedTab="{!currentTab}" switchType="client" immediate="true" id="tabPanel">
            <apex:tab label="Tab1" name="one" disabled="{!currentTab<>'1'}" >
                 <apex:inputField value="{!acc.test__c}"/>
                <apex:commandButton value="Next" action="{!nextTab}" onclick="tempDisableBeforeUnload = true;" reRender="tabPanel"/>
            </apex:tab>
            <apex:tab label="Tab2" name="two" disabled="{!currentTab<>'2'}">
                <apex:inputField value="{!acc.test__c}"/>
                <apex:commandButton value="Next" action="{!nextTab}" onclick="tempDisableBeforeUnload = true;" reRender="tabPanel"/>
                <apex:commandButton value="Previous" action="{!prevTab}" onclick="tempDisableBeforeUnload = true;" reRender="tabPanel"/>    
             </apex:tab>
            <apex:tab label="Tab3" name="three"  id="SecondTab" disabled="{!currentTab<>'3'}" >
                <apex:inputField value="{!acc.test__c}"/>
                <apex:commandButton value="Next" action="{!nextTab}" onclick="tempDisableBeforeUnload = true;" reRender="tabPanel"/>
                <apex:commandButton value="Previous" action="{!prevTab}" onclick="tempDisableBeforeUnload = true;" reRender="tabPanel"/>   
            </apex:tab>
        </apex:tabPanel>
    </apex:form>
    </apex:outputpanel>
    <apex:outputPanel id="viewState"  rendered="{!display}">
    overview
    </apex:outputpanel>
</apex:page>

Class :

public class aaa{
Public Account acc {get;set;}
public String currentTab { get; set; }
public boolean display {get;set;}
    public aaa(){
       display = false;
        acc = new Account();
        currentTab = '1';
    }
    public void nextTab() {
        if(currentTab == '1'){
            currentTab = String.valueOf(Integer.valueOf(currentTab)+1);
        }
        else if(currentTab == '2'){
                currentTab = String.valueOf(Integer.valueOf(currentTab)+1);
        }
   
        else if(currentTab == '3'){
            display = true;
            currentTab = String.valueOf(Integer.valueOf(currentTab)+1);  
        }
    }
    public void prevTab(){
    currentTab = String.valueOf(Integer.valueOf(currentTab)-1);
    }   
}
Hi,

DateTime todayDate = system.today();
if ([SELECT count() FROM AsyncApexJob WHERE CreatedDate =:todayDate AND JobType='BatchApex' AND (Status = 'Processing' OR Status = 'Preparing')]<5)

getting error in this query as

caused by: System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact salesforce.com about custom indexing.
Even if a field is indexed a filter might still not be selective when:
1. The filter value includes null (for instance binding with a list that contains null)
2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times):

can any one please help on this.Its urgent
Hi,

                I written one batch class,and schedular class.From trigger I am calling these two calsses.

                if ([SELECT count() FROM AsyncApexJob WHERE JobType='BatchApex' AND (Status = 'Processing' OR Status = 'Preparing')]<5){
                           database.executebatch(updateContact,200);
                }
                else{              
                            scheduledupdateContactOwner sc = new scheduledupdateContactOwner(UpdateContacts);
                            Datetime dt = Datetime.now() + (0.024305); // i.e. 30 mins
                            String timeForScheduler = dt.format('s m H d M \'?\' yyyy');
                            Id schedId = System.Schedule('ContactOwnerUpdate'+timeForScheduler,timeForScheduler,sc);
                }


But i am getting below error In the below Query 

if ([SELECT count() FROM AsyncApexJob WHERE JobType='BatchApex' AND (Status = 'Processing' OR Status = 'Preparing')]<5)

If I run this query with out filters also results are less than 800.If I seacrh in google In every post inframtion is need to give more filters.

Can anyone expalin how to solve this issue..

Thanks in advance,


Hi,

In my controller i have one getter,setter variable.
public boolean test {get;set;}
public void next(){
test = true;
}
In page i have one button 
<apex:commandbutton value="Next" action = "{!Next()}" />
This will call component alse

In component 
<apex:attribute name="extrapoints" type="Boolean" description="extrapoints" assignTo="{!test}" />
<apex:outputText value ="{!test}"
If i debug the component i am getting false value.But i need here true.

Can any one help on this

Thanks,

Hi,

 

Auto number value is  "aaa-1000"

Auto_Number__c is a autonumber field and I am trying get mod value of thsi field but value is not coming # Error ! displaying.How can i get mod value of auto number field

 

MOD( VALUE(Auto_Number__c),7)

 

Please give solution for the above problem

 

Thanks

Hi,

 

Case is having related list Email.I am sending email to one mail id.I want to give reply to that email and it has to attach to the particular case.

Can any one please suggest me how to do this.

 

 

Thanks in advance,

 

 

Hi,

 

I am following the below link.

 

http://salesforce-ever-knowledge.blogspot.in/2013/01/display-multi-picklist-as-checkboxes.html

 

This will work for new mode.

 

Suppose I have one contact record with Military_Branches__c values as" Failure consulting KB,Did not follow problem solving steps".

How I can show these two values "Failure consulting KB,Did not follow problem solving steps" as checked and reamining values as unchecked in edit mode.

 

Please suggest me can we use schemas for edit mode.

 

Thanks in advance

Hi,

In my controller i have one getter,setter variable.
public boolean test {get;set;}
public void next(){
test = true;
}
In page i have one button 
<apex:commandbutton value="Next" action = "{!Next()}" />
This will call component alse

In component 
<apex:attribute name="extrapoints" type="Boolean" description="extrapoints" assignTo="{!test}" />
<apex:outputText value ="{!test}"
If i debug the component i am getting false value.But i need here true.

Can any one help on this

Thanks,
Hi,

I created multi level approval process.Suppose If A is approved then B needs to approved.If B is Approved then C needs to approved.Till the time records has to be unlocked.I made it for 3 users profile API Enabled is true.And in workfflow & Approval Settings 'Enable Email Approval Response' is also checked.But when I approve from email each level Email Service address is not coming automatically.Every time i dont wnat to copy reply-To address in the email status bar.Some times it is coimng automatically and some times it is not coimng automatically..

Its urgent..

Thanks in advance,




 
Hi,

                I written one batch class,and schedular class.From trigger I am calling these two calsses.

                if ([SELECT count() FROM AsyncApexJob WHERE JobType='BatchApex' AND (Status = 'Processing' OR Status = 'Preparing')]<5){
                           database.executebatch(updateContact,200);
                }
                else{              
                            scheduledupdateContactOwner sc = new scheduledupdateContactOwner(UpdateContacts);
                            Datetime dt = Datetime.now() + (0.024305); // i.e. 30 mins
                            String timeForScheduler = dt.format('s m H d M \'?\' yyyy');
                            Id schedId = System.Schedule('ContactOwnerUpdate'+timeForScheduler,timeForScheduler,sc);
                }


But i am getting below error In the below Query 

if ([SELECT count() FROM AsyncApexJob WHERE JobType='BatchApex' AND (Status = 'Processing' OR Status = 'Preparing')]<5)

If I run this query with out filters also results are less than 800.If I seacrh in google In every post inframtion is need to give more filters.

Can anyone expalin how to solve this issue..

Thanks in advance,


Hi,

In my controller i have one getter,setter variable.
public boolean test {get;set;}
public void next(){
test = true;
}
In page i have one button 
<apex:commandbutton value="Next" action = "{!Next()}" />
This will call component alse

In component 
<apex:attribute name="extrapoints" type="Boolean" description="extrapoints" assignTo="{!test}" />
<apex:outputText value ="{!test}"
If i debug the component i am getting false value.But i need here true.

Can any one help on this

Thanks,

Hi,

 

Case is having related list Email.I am sending email to one mail id.I want to give reply to that email and it has to attach to the particular case.

Can any one please suggest me how to do this.

 

 

Thanks in advance,