• Ramon Pereira
  • NEWBIE
  • 120 Points
  • Member since 2012
  • TCS TATA Brazil

  • Chatter
    Feed
  • 3
    Best Answers
  • 1
    Likes Received
  • 2
    Likes Given
  • 20
    Questions
  • 42
    Replies
Hello Experts,

On opportunities page, there is no option in the page layout for the quote line item related lists to be sorted by a specific column. I would like to sort this related list on any column that I choose. Will I have to develop a custom Sort button for this? And if I do that, can I see the sort results right in the related list on the same opportunities page? Or it needs to be a different VF page?

Please advise

hello,

 

i'm getting the following error:-

 

An unexpected error occurred. Please include this ErrorId if you contact support: 398158509-89290 (-1629302653)

 

now where use this error id..? i tried contacting support but i only get to CRM support... Is there any other place where i can get support..?

 

 

thanks in advance..!!

regards,

akshay

I need to create a web app utiliznado sites force.com, however my client has no active customer portal. It is possible to create authentication without acquiring the customer portal?
I created a formula field that displays four images according to some criteria. The image is displayed correctly in the registration page, however when entering the field in a related list, the formula is not performed correctly.

fomula:
IF( AND( LEN(TEXT(Data_de_Pagamento__c)) = 0 , Data_de_Vencimento__c < NOW() ), IMAGE("/servlet/servlet.FileDownload?file=015G000000JGW5Y", "Red" , 16,16), 
IF( Data_de_Pagamento__c > Data_de_Vencimento__c ,IMAGE("/servlet/servlet.FileDownload?file=015G000000JGW5i", "Yellow", 16,16) , 
IF(AND( LEN(TEXT(Data_de_Pagamento__c)) > 0 , Data_de_Vencimento__c >= Data_de_Pagamento__c ) , IMAGE("/servlet/servlet.FileDownload?file=015G000000JGW5T", "Green" , 16,16), 
IMAGE("/servlet/servlet.FileDownload?file=015G000000JGW59", "Blue", 16,16) ) ) )
It is a good practice I make a SOAP call to an external service salesforce using a custom button (js)?

Many customers need to send sales order to ERP, in a standard page insert a custom button (js) that calls my apex method that performs the call to the ERP, however this time the screen is frozen to the user aguarando the ERP response. What would be the best way to make this call?
Hello,

With the deactivation of SSL, we can still send messages output via http? Ie the option to disable communication protocol for remote sites still available?

Thank you
Hello,

I created a formula field that according to check some fields returns the image to the status of the object. In the registration screen, the image is displayed correctly, however when viewing the record in the related list appears another image.

The formula is:
IF(  AND(  LEN(TEXT(Data_de_Pagamento__c)) = 0 , Data_de_Vencimento__c < NOW() ), IMAGE("/servlet/servlet.FileDownload?file=015J0000000VrPW", "Red" , 16,16),
IF( Data_de_Pagamento__c  >  Data_de_Vencimento__c ,IMAGE("/servlet/servlet.FileDownload?file=015J0000000VrNp", "Yellow", 16,16) ,
   IF(AND(  LEN(TEXT(Data_de_Pagamento__c)) > 0 , Data_de_Vencimento__c >= Data_de_Pagamento__c ) , IMAGE("/servlet/servlet.FileDownload?file=015J0000000VrPv", "Green" , 16,16), 
    IMAGE("/servlet/servlet.FileDownload?file=015J0000000Vrb3", "Blue", 16,16) ) ) )

Has anyone had this problem?
Hello,

I created a WS service in SF and would like to access it in Java. I used this as a basis discussion here (https://developer.salesforce.com/forums?id=906F00000008qEkIAI), however I can not find some classes that were generated.
Ex: SforceServiceLocator and SoapBindingStub.

Generated the file through Enterprise.jar my enterprise.wsdl. Also I generated my classes through the WSDL service.

Could you help me please.

Thank you;
Hello people,

I have the following scenario, I need to create a form of sales force update records in a range of 5 in 5 minutes. The update data will be triggered by another application by WS.
I wonder if in Java I can force the sales force to execute a method for querying another system and get the information.

Note: I already have the code written in Apex that implements this functionality. Did assiona it automatically by an application in java.

Anyone have ideas how to solve this problem?

Thank you;
Hello, I developed some WS-SOAP services that will be available to perform integrations with other applications. But I wonder if Apex allows you to add annotations to the WSDL inform what information is required for using the service.


Thank you;

Personal, 

 

I have the following problem:

 

I have a button on the page of details that requests information to another system using SOAP.
To inform the User that the system getting this information, I created a small adjustment as seen here to display a modal window Query.

The problem is that the code below only works in firefox or chrome on the Internet does not work.

Could someone help me.

Code button javaScript&colon; 

 
{!REQUIRESCRIPT('/js/functions.js')} 
{!REQUIRESCRIPT('/resource/jQuery/jquery-1.8.2.min.js')} 
{!REQUIRESCRIPT('/resource/jQuery/ui/jquery-ui-1.9.1.custom.min.js')} 
{!REQUIRESCRIPT('/soap/ajax/27.0/connection.js')} 
{!REQUIRESCRIPT("/soap/ajax/27.0/apex.js")} 



requireCssFile('/resource/jQuery/ui/css/ui-lightness/jquery-ui-1.9.1.custom.min.css'); 

function requireCssFile(filename) { 
var fileref = document.createElement('link'); 
fileref.setAttribute('rel', 'stylesheet'); 
fileref.setAttribute('type', 'text/css'); 
fileref.setAttribute('href', filename); 
document.getElementsByTagName('head')[0].appendChild(fileref); 
} 
var j$ = jQuery.noConflict(); 

var j$modalDialog = j$('<div></div>') 
.html('Por favor aguarde... <br> <br> <img src="https://cs11.salesforce.com/resource/1371832281000/aguarde_Opp_SL_COM_025" width="170" height="25" alt="Aguarde..."> ') 
.dialog({ 
autoOpen: false, 
title: 'Atualizando Cliente', 
resizable: false, 
width: 200, 
height: 180, 
autoResize: true, 
modal: true, 
draggable: false 

}); 
console.log("Preparando para carregar a pagina com Jquery"); 
j$modalDialog.dialog('open'); 
console.log("Pagina Jquery carregada! "); 
console.log("Preparando para atualizar Cliente"); 
atualizarCliente() 
console.log("Retorno da solicitação"); 

function atualizarCliente(){ 
Id="{!Account.Id}"; 
msg = sforce.apex.execute("AtualizaClienteController","atualizarCliente",{idAcc:Id}); 

if(msg == null || msg == ''){ 
msg = 'Erro ao consultar o Cliente!'; 
} 
window.confirm(msg); 
window.location.reload(); 
} 


//j$modalDialog.dialog('close');

 

 

Thanks; 

Personal, 

 

could give me a hint how to check duplicate products I have in my opportunities.
I have to check if the User is creating the record.

 

Thank you

hello to all,

 

I am calling a web service through a custom button on the layout page. But the return of the web service is available through windows "alert" javascript. I wonder if you guys have an idea how I could present the return messages and also inform users that the system is querying an external service (screen with a message wait); Does anyone have any idea how I can do this?

 

Thank you all.

staff,

I wish my Visualforce page was built according to the form elements. Show an accurate information block from a value of a field. I did so, but it does not work: (When passed a single parameter, it works, but as I used the formula OR, did not work)

 

<apex:pageBlockSection title="Produtos e Acessoria Técnica" columns="3" rendered="OR({!Pesquisa_de_mercado__c.Canal_de_Distribui_o__c == 'CONCRETEIRA'},{!Pesquisa_de_mercado__c.Canal_de_Distribui_o__c == 'INDUSTRIA'} )" >

 

 

Does anyone know a way to accomplish?

 

thank you

staff,

 

I need to create a SOQL return all the activities that were carried out by a particular User.
I created this SOQL, however it returns me bills that have not passed on the activities of the User where clause.

Could you help me please.

 

	Select a.name, (Select subject, CreatedBy.Name from activityHistories where CreatedById = '005A0000001AVM1' ORDER BY ActivityDate ) from account a 

 

 

thank you

 

Hello,

 

I have the following problem: I need to capture the number of minutes that the User was not a case to answer. I used the following logic in triggrer below:

 

if(  (casesSLA[0].Tempo_Atendimento__c == 0)&&(casesSLA[0].Disposicao_imediata__c != null)){  
                                casesSLA[0].Tempo_Atendimento__c = Math.floor((casesSLA[0].LastModifiedDate.getTime () 
                                                        - casesSLA[0].CreatedDate.getTime ())* 0.00001666666666666667 );

} 

 

 

But she is a triggrer before update, then the User have to save twice the record so that it can capture time. When reading the documentation, I found that with triggre after update is not possible to perform DML operations.

Anybody know any other way so that I can perform this calculation without forcing the User to save twice the record?

thank you

Good morning everyone,

 

I'm developing a logical apex and need to capture the SOAP I send to invoke an external web service. Anyone know of any method that can do this?

 

Thank you

Staff,

 

Need an idea of how to upgrade over 20,000 records with an apex class.


I was thinking about scheduling the service and leave running overnight, however the limits have to be respected.

Does anyone have any idea how I can perform this update?

 

 

thank you

Hello,

 

I have to create a page to create a oportunide this same page and should be able to enter the User Products for the opportunity. I had the idea of creating a screen User wizard who first creates the opportunity in the next screen and it chooses the products, but how do I capture the id of opportunidade that I created in the previous screen?

 

thank you

Hello,

I have some services Web services native to Sales Force. I would get the SOAP response and sending these requests. Anyone know a way to capture this information?

Thank you.

I have a field (account.id) that opens a window to search. I would like to capture the id of the account that I selected. In my organization I have multiple accounts with the same name and perform a SOQL query passing the name as parameter end up retrieving the wrong record. Someone has gone through this problem?

Hi, 

 

I would like to copy the value from one field to another automatically.
I made the following code, but it does not run.
Someone must help me?

 

<apex:page standardController="Opportunity" id="page1" >

<apex:sectionHeader title="Test"/>
<apex:messages />
<apex:form id="form1">
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" title="Salvar" value="Salve"  />
<apex:commandButton action="{!cancel}" title="Cancelar" value="Cancel" />
</apex:pageBlockButtons>



<apex:panelGrid columns="2">
<apex:outputLabel >Client:</apex:outputLabel>
<apex:inputField value="{!Opportunity.AccountId}" required="true" id="campo2" />
<apex:outputLabel > Name: </apex:outputLabel>
<apex:inputField value="{!Opportunity.name}" id="campo1" onblur="copyT()" />
<apex:outputLabel > Stage: </apex:outputLabel>
<apex:inputField value="{!Opportunity.StageName}" />
<apex:outputLabel > Date: </apex:outputLabel>
<apex:inputField value="{!Opportunity.CloseDate}" />

</apex:panelGrid>

</apex:pageBlock>
</apex:form>  

<script type="text/javascript">
        function copyT(){
                valor = document.getElementById('{!$Component.campo1}').value;
                
                    document.getElementById('{!$Component.campo2}').value = valor;
            }
           
    </script>

  
</apex:page>

 

Hello, I developed some WS-SOAP services that will be available to perform integrations with other applications. But I wonder if Apex allows you to add annotations to the WSDL inform what information is required for using the service.


Thank you;
Anyone have a good way to query the UserServicePresence object? This object creates multiple records per agent per day. I only need to query the most recent record. 
Hi All,

I have to create a report with one 'field' that chaged to 'one text value'  in the past 7 days and same 'field' with different " text value" no specific time.
Report need to be generated on weekly basis.
Hi all,

Our client wants to buy a Live Agent Service Cloud Application, and he wants intagrate it in a mobile application. But he was not satisfied with the REST API. He wants to use the WebSocket protocol to connect client application with the technical support service. So the question is: Does anyone know anything Salesforce supports this type of communication or not? It is also one of the issues was the use of Push-notifications (GCM / APNS), so second quaestion is: does it possible to send Push notifactiobs to mobile app from Live Agent?

Best regards,
Vitalii Bezbozhnyi
Hi Friends,

I have 3 object A,B and C. A is the Parent of B and B is the parent of C object. I have one multiselectfield field on object A, Nopw whenever a C object record is created I want to copy multiselect field from Object A to C object Field, Is there anyway we can do it ?

Please suggest some idea.

Regards,
RahulHi Friends,

I have 3 object A,B and C. A is the Parent of B and B is the parent of C object. I have one multiselectfield field on object A, Nopw whenever a C object record is created I want to copy multiselect field from Object A to C object Field, Is there anyway we can do it ?

Please suggest some idea.

Regards,
Rahul
Hello Experts,

On opportunities page, there is no option in the page layout for the quote line item related lists to be sorted by a specific column. I would like to sort this related list on any column that I choose. Will I have to develop a custom Sort button for this? And if I do that, can I see the sort results right in the related list on the same opportunities page? Or it needs to be a different VF page?

Please advise
Hi All,

We are facing one wierd issue.
When the master record is locked by an approval process, it's detail records are also getting locked.
Below is the screenshot of button area of child record. As you can see lock icon appeared just before edit button.  
Child record don't even have any active approval process.
Lock

When the user tries to edit it, he is getting the below error.
"The record you are trying to edit has been locked. Please contact your administrator if access is necessary. "

Here comes the wierd part, 
Two objects are using the same object as master, but only records of one object are getting locked when master record is locke
d.

I found the below link. But even as per it, when master record is locked, child records of all the objects which are having the same master should be locked ? Isn't it ?
https://help.salesforce.com/apex/HTViewSolution?id=000005483&language=en_US

May be I am missing something. Any idea what the issue is ?
  • January 06, 2016
  • Like
  • 0
I want to use the salesforce bulk api using php.So I cant find the partnerApiEndPoint and sessionID to use that api. Please tell me how can I find those values.
Hi, 
We updated SandBox according with production instance, but after that our API integration
with SANDBOX, stop to work.

- We tried so hard looking forums, and websites to help me with this problem but I did not find a solution.

- We imported the WSDL on SOAPui and everything work fine, but when we try to connect via API, we receive that message:

Error Type Detail: SOAP-FAULT-DETAIL
Serialized SOAP fault detail: <detailxmlns:sf="urn:fault.enterprise.soap.sforce.com"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <sf:UnexpectedErrorFault
xsi:type="sf:UnexpectedErrorFault">
        <sf:exceptionCode>INVALID_SESSION_ID</sf:exceptionCode>
        <sf:exceptionMessage>Invalid Session ID found in SessionHeader:
Illegal Session</sf:exceptionMessage>
    </sf:UnexpectedErrorFault>
</detail>upSert
Hi,

There are two Custom Objects, Object1 (Parent), Object2 (Child). Both are in MD relationship.

Object1 (Parent) has a picklist field "Statuc__c" with values InProgress & Completed.
Object2 (Child) has a field of CheckBox datatype "Completed__c".

Now. When the value of checkbox Completed__c is true in all the records of an associated parent record. then only the filed Status__c in Object1 should change to the value Completed.

How can I achieve this?

Your suggestion will be appreciated.
  • January 05, 2016
  • Like
  • 0
Hello Guys,
                   I need a search list button on vf page.  when we type for any keyword to search it should display all the items related to that word. How to achieve this?
i have list ..after inserting that list i want get that all id's of that list records..is it possible ..please give some suggesstions...

thanks in advance

Regard's

Vamsi Krishna..

Hello,

i am using below code for login into salesforce from php and perform insert,update, delete using that connection object. 

$mySforceConnection = new SforcePartnerClient();
$mySforceConnection->createConnection(SALESDIRECTORY . "partner.wsdl.xml");
$mySforceConnection->login(USERNAME, PASSWORD . SECURITY_TOKEN);


now if the USERNAME changes password in salesforce than above code will not login user using old PASSWORD.

how to overcome this issue ? 

is there any other method for login and getting connection object? 

 

Hello everyone, I am new to salesforce and barely know half of it's cool features!

I am having this strange problem with my company's sandbox org.

I ran through the basic REST-API example code in JAVA, simple OAuth and everything, just to see if I am able to connect to the sandbox using the REST API.

It appears to be that the login failed and showed me the error code 400. 

However, on my personal org, that I can set up after signgin up with an developer-account, the same code appears to work JUST fine. I get no error messages at all, I can even run some basic queries on that.

NOTE: I have configured the JAVA-Code for the REST-API example to the sandbox environment, it's basically like this:
* Login credentials have been replaced with ' * '.
 
public class sbRest {

    private static final String USERNAME     = "*****************";
    private static final String PASSWORD     = "*****************";
    private static final String LOGINURL     = "https://test.salesforce.com";
    private static final String GRANTSERVICE = "/services/oauth2/token?grant_type=password";
    private static final String CLIENTID     = "********************";
    private static final String CLIENTSECRET = "*******************";
    
    
    public static void main(String[]args) throws UnsupportedEncodingException {

        HttpClient httpclient = HttpClientBuilder.create().build();
 
        // Assemble the login request URL
        String loginURL = LOGINURL +
                          GRANTSERVICE +
                          "&client_id=" + CLIENTID +
                          "&client_secret=" + CLIENTSECRET +
                          "&username=" + USERNAME +
                          "&password=" + PASSWORD;
 
        // Login requests must be POSTs
        HttpPost httpPost = new HttpPost(loginURL);
        HttpResponse response = null;
 
        try {
            // Execute the login POST request
            response = httpclient.execute(httpPost);
        } catch (ClientProtocolException cpException) {
            cpException.printStackTrace();
        } catch (IOException ioException) {
            ioException.printStackTrace();
        }
 
        // verify response is HTTP OK
        final int statusCode = response.getStatusLine().getStatusCode();
        if (statusCode != HttpStatus.SC_OK) {
            System.out.println("Error authenticating to Force.com: "+statusCode);
            // Error is in EntityUtils.toString(response.getEntity())
            return;
        }
 
        String getResult = null;
        try {
            getResult = EntityUtils.toString(response.getEntity());
        } catch (IOException ioException) {
            ioException.printStackTrace();
        }
        JSONObject jsonObject = null;
        String loginAccessToken = null;
        String loginInstanceUrl = null;
        try {
            jsonObject = (JSONObject) new JSONTokener(getResult).nextValue();
            loginAccessToken = jsonObject.getString("access_token");
            loginInstanceUrl = jsonObject.getString("instance_url");
        } catch (JSONException jsonException) {
            jsonException.printStackTrace();
        }
        System.out.println(response.getStatusLine());
        System.out.println("Successful login");
        System.out.println("  instance URL: "+loginInstanceUrl);
        System.out.println("  access token/session ID: "+loginAccessToken);
 
        // release connection
        httpPost.releaseConnection();    
    } 
}



Is there any additional configuration I need to make, or any changes on the "network access" on the sandbox platform? I really don't know what could be causing this issue, as for my own personal org, it works just fine, using the exact same code.

I would appreciate any help!

Thank you.
Hi All,
currently i am in a evaluation process of connecting Voice/ACD with the new SFDC Omni-Channel feature. 

The ACD provider will be integrated using OpenCTI. Indeed OpenCTI exists in the CallCenter console component of the ServiceConsole. Usually the ACD provider takes care of the call routing and the only interaction with SFDC is done in context of the OpentCTI HTML/JavaScript code (inbound and outbound calls, call logging etc.). This HTML/JavaScript code is always running in context of the browser of a particular agent. The session between the agent and the ACD server is handled by the CallCenter console component (pure Cloud solution) or some kind of local desktop app as a middleware between the CallCenter console component and the ACD server.

I have an ongoing discussion with SFDC about there recommendation to integrate OpenCTI with Omni-Channel to make sure the Omni-Mechanism will manage the Agent-Blending completely on SFDC side.

SFDC suggest to let the ACD system create a Case … which will be handled by a Omni-Service channel. A Omni routing configuration assigned to a queue will route that case to an agent. As soon as an agent picks that case from the Omni console component the ACD is notified via SFDC streaming API to connect the pending call with the agent who accepted the case. In fact the ACD server is the only subscriber of the StreamingAPI PushTopic.

I have a fundamental problem to understand that approach:
1. from my understanding OpenCTI only runs in context of a client browser … to create a case outside that context, OpenCTI needs to connect to SFDC in a different way. That was the old CTI way … OpenCTI tries to get rid of that!

2. StreamingAPI cannot connect to server side processed outside of SFDC (like a server run by a ACD provider), again: the only way is to notify the OpenCTI console component via Javascript events fired by service console integration toolkit. 

Does anyone ever did such an implementation or found any kind of best practice documents coming from SFDC?

Before you ask: we have a running ServiceCloud implementation (1000+ agents) using OpenCTI in the „classic way“ for a couple of years now. Moreover we have a new PoC using Omni-Channel for Email,Web and LiveAgent in place. The missing piece is to connect OpenCTI and Omni and let Omni do the call routing instead of the ACD provider.

Thanks for any kind of inspiration 

Best,
Andreas
I generated enterpise WSDL via Setup > Develop > API.  I am getting error while generating java classes and domain objects via the wsimport tool included in the JAX-WS toolkit. It seems to be generating duplicate names in the schema. Can anyone help me fix my environment so it generates a clean wsdl. Is there anyway to select only objects I want to generate because it is a very long WSDL containing all objects which I may not need. 

The command I used is:
./wsimport.sh -verbose ../../salesforce.wsdl.xml

The Errors are:

[WARNING] src-resolve: Cannot resolve the name 'tns:ID' to a(n) 'type definition' component.
  line 44 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml#types?schema1
[WARNING] Simple type "StatusCode" was not mapped to Enum due to EnumMemberSizeCap limit. Facets count: 274, current limit: 256. You can use customization attribute "typesafeEnumMaxMembers" to extend the limit.
  line 15439 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] A class/interface with the same name "com.sforce.soap.enterprise.DescribeGlobalTheme" is already in use. Use a class customization to resolve this conflict.
  line 16052 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] (Relevant to above error) another "DescribeGlobalTheme" is generated from here.
  line 17487 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] A class/interface with the same name "com.sforce.soap.enterprise.DescribeLayout" is already in use. Use a class customization to resolve this conflict.
  line 17615 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] (Relevant to above error) another "DescribeLayout" is generated from here.
  line 16653 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] A class/interface with the same name "com.sforce.soap.enterprise.DescribeApprovalLayout" is already in use. Use a class customization to resolve this conflict.
  line 17684 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] (Relevant to above error) another "DescribeApprovalLayout" is generated from here.
  line 16635 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] Two declarations cause a collision in the ObjectFactory class.
  line 16052 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] (Related to above error) This is the other declaration.   
  line 17487 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] Two declarations cause a collision in the ObjectFactory class.
  line 17615 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] (Related to above error) This is the other declaration.   
  line 16653 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] Two declarations cause a collision in the ObjectFactory class.
  line 17684 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] (Related to above error) This is the other declaration.   
  line 16635 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] Two declarations cause a collision in the ObjectFactory class.
  line 15025 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] (Related to above error) This is the other declaration.   
  line 15028 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
[ERROR] Two declarations cause a collision in the ObjectFactory class.
  line 15029 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
(ERROR] (Related to above error) This is the other declaration.   
  line 15026 of file:/Users/sargawal/Downloads/salesforce.wsdl.xml
Exception in thread "main" com.sun.tools.ws.wscompile.AbortException
    at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:144)
    at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2298)
    at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:198)
    at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:141)
    at com.sun.tools.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:444)
    at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:205)
    at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:183)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.sun.tools.ws.Invoker.invoke(Invoker.java:174)
    at com.sun.tools.ws.WsImport.main(WsImport.java:57) 

 
I am trying to find the best approach to find out if an Opportunity Line Item is a 'duplicate' based on the Product Name on the line item as well as a few fields on the Opportunity record itself, maybe Client Name, Business Unit and Sales Stage.

My thoughts are to use an after insert trigger to determine which fields need to be grabbed to 'lookup' exsiting opportunities and opportunity line items that might be duplicates, but I am stuck on how to do the code and then bulkify the code.  What type of collections(s) should the key fields be placed in so that we can query the database to look for potential duplicates?  If this is not the correct approach, please let me know.

Any suggestions?

 
  • October 06, 2015
  • Like
  • 0
Hello friends
what is quotation in salesforce.
Please let me know with practical example, where it is used and why.

any interview questions on quotation will be appreciated.

krishna​​​​
trigger OnboardingPackage on Task (after insert) {
    
    Set<String> whatIDs = new Set<String>();
    
    for (Task t : Trigger.new) {
        whatIDs.add(t.whatID);
    }
    
    List<Opportunity> opps = [SELECT Id, Product__c, Accounting_Platform__c,Plan__c,Billing_Cycle__c FROM Opportunity WHERE Id =: whatIDs];
    
    List<Contact> conList = new List<Contact>([select Email from Contact where Id In (select ContactId from OpportunityContactRole where OpportunityId = :whatIDs)]); 
    
    EmailTemplate et1 = [SELECT id FROM EmailTemplate WHERE Name = 'Onboarding Package Desktop included']; // Stephanie
    EmailTemplate et2 = [SELECT id FROM EmailTemplate WHERE Name = 'Onboarding Package Desktop not included']; //Andrew
    EmailTemplate et3 = [SELECT id FROM EmailTemplate WHERE Name = 'Onboarding Package Cloud']; // Andrew
    EmailTemplate et4 = [SELECT id FROM EmailTemplate WHERE Name = 'Onboarding Package Shiplark'];
    EmailTemplate et5 = [SELECT id FROM EmailTemplate WHERE Name = 'Accounting Consult']; 
    EmailTemplate et6 = [SELECT id FROM EmailTemplate WHERE Name = 'Onboarding Package Desktop included for POS']; // Aaron
    EmailTemplate et7 = [SELECT id FROM EmailTemplate WHERE Name = 'Onboarding Package Desktop included for PPI']; //Andrew
    
 
    for(Task t:Trigger.New){
        
        for(Opportunity o :opps){
            
            for(Contact c: conList){
            
               if((t.subject=='Implementation service : Install') && (o.Plan__c=='EnterpriseHosting' || o.Plan__c=='pro/premierHosting' ||  o.Accounting_Platform__c== 'QuickBooks Enterprise (US)' || o.Accounting_Platform__c=='NetSuite')){
                      sendNotification(et1.id, c.id, o.id);
                        
                }else if((t.subject=='Implementation service : Install') && (o.Accounting_Platform__c=='QuickBooks POS (US)')){
                    sendNotification(et6.id, c.id, o.id); 
                       
                }else if((t.subject=='Implementation service : Install') && (o.Accounting_Platform__c=='QuickBooks Pro/Premier (US)' ||  o.Accounting_Platform__c== 'QuickBooks CA/UK/ZA/AU') && o.Billing_Cycle__c=='Yearly'){
                    sendNotification(et7.id, c.id, o.id); 
                       
                }else if((t.subject=='Implementation service : Install') && (o.Accounting_Platform__c=='QuickBooks Pro/Premier (US)' ||  o.Accounting_Platform__c== 'QuickBooks CA/UK/ZA/AU') && o.Billing_Cycle__c=='Monthly' ){
                    sendNotification(et2.id, c.id, o.id); 
                       
                }else if((t.subject=='Implementation service : Install') && (o.Accounting_Platform__c=='QuickBooks Online (US)' || o.Accounting_Platform__c== 'Xero (US)')){
                    sendNotification(et3.id, c.id, o.id);  
                  
                }else if((t.subject=='Implementation service : Install') && (o.Accounting_Platform__c=='Shiplark')){
                    sendNotification(et4.id, c.id, o.id);  
                      
                }else if(t.subject=='Implementation service : Pro Advisor'){
                    sendNotification(et5.id, c.id, o.id);  
                  
                }
                
            }
        }            
    }
    
  public void sendNotification(string eTempID,string tgtObjID,string  whatID){

        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        // CONFIGURE MAIL
          mail.setTemplateId(eTempID); 
          mail.setTargetObjectId(tgtObjID);
          mail.setWhatId(whatID);
          mail.setReplyTo('customersuccess@webgility.com');

        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
    }

}
Hey there,

We're looking tooffer a "Sign in with SalesForce" authentication option to our Customers, so their employees can seamlessly access our product. The App we're providing is not hosted on Forced.com and we're planning to do this using SSO + OAuth.

Rather than asking each of our customers to create a Custom App on their SalesForce account and share their App secrets with us, is there a way we could create one single OAuth App, that they could simply "enable" on their side? Just like on the Twitter or Facebook API, for example.

public class intrigoSoapSforceCom123 {
    public class Response_element {
        public String sapno;
        private String[] sapno_type_info = new String[]{'sapno','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'urn:intrigo.soap.sforce.com','false','false'};
        private String[] field_order_type_info = new String[]{'sapno'};
    }
    public class SFDCResponse {
        public intrigoSoapSforceCom123.Response_element[] Response;
        private String[] Response_type_info = new String[]{'Response','urn:intrigo.soap.sforce.com','Response_element','1','-1','false'};
        private String[] apex_schema_type_info = new String[]{'urn:intrigo.soap.sforce.com','false','false'};
        private String[] field_order_type_info = new String[]{'Response'};
    }
    public class Employee_element {
        public String EmployeeNo;
        public String Ename;
        public String Salary;
        private String[] EmployeeNo_type_info = new String[]{'EmployeeNo','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] Ename_type_info = new String[]{'Ename','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] Salary_type_info = new String[]{'Salary','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'urn:intrigo.soap.sforce.com','false','false'};
        private String[] field_order_type_info = new String[]{'EmployeeNo','Ename','Salary'};
    }
    public class SI_SFDC_OUTPort {
        public String endpoint_x = 'http://ca-test02.intrigosys.com:52000/XISOAPAdapter/MessageServlet?channel=party:BC_SFDCTEST:CC_SEND...
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        private String[] ns_map_type_info = new String[]{'urn:intrigo.soap.sforce.com', 'testSoapSforceCom123'};
        public intrigoSoapSforceCom123.Response_element[] SI_SFDC_OUT(testSoapSforceCom123.Employee_element[] Employee) {
            intrigoSoapSforceCom123.SfdcTest_Request request_x = new intrigoSoapSforceCom123.SfdcTest_Request();
            intrigoSoapSforceCom123.SFDCResponse response_x;
            request_x.Employee = Employee;
            Map<String, intrigoSoapSforceCom123.SFDCResponse> response_map_x = new Map<String, intrigoSoapSforceCom123.SFDCResponse>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://sap.com/xi/WebService/soap1.1',
              'urn:intrigo.soap.sforce.com',
              'MT_SFDC_Request',
              'urn:intrigo.soap.sforce.com',
              'MT_SFDC_Response',
              'intrigoSoapSforceCom123.SFDCResponse'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.Response;
        }
    }
    public class SfdcTest_Request {
        public intrigoSoapSforceCom123.Employee_element[] Employee;
        private String[] Employee_type_info = new String[]{'Employee','urn:intrigo.soap.sforce.com','Employee_element','1','-1','false'};
        private String[] apex_schema_type_info = new String[]{'urn:intrigo.soap.sforce.com','false','false'};
        private String[] field_order_type_info = new String[]{'Employee'};
    }
}

 

how can i call generated apex  class in another class?

 

How to call another class in trigger?

 

custom object - employee (eno ,ename ,salary)

 

please help for this code