-
ChatterFeed
-
2Best Answers
-
0Likes Received
-
0Likes Given
-
19Questions
-
17Replies
Maximum value for Case number ?
What is the maximum value allowed for CaseNumber ? since it is an autonumber, does that mean it has 20 prefix+ 10 number size? Our case record has no prefix, does that mean we can go upto 30 digit number?
More importantly what happens if I have no prefix and go over 9,999,999,999 case number?
Any help will be greatly appreciated,
Thanks
SunnySlp
- Sunny_Slp
- December 12, 2011
- Like
- 0
- Continue reading or reply
Editing apex class in Production
I need to add a small change to the code in production, I know it is not possible via UI, but I read in the documentation that it can be done via either deploy or forceIDE. My thing against deploying is we have lot of tests, and these minor changes come in frequently. So deploying for every minor change takes a lot of time.
When doing via forceIDE, can I just modify the code in the IDE's editor and right click the class-> "save to server" ? or do I have "deploy to server" even with forceIDE?
Any help with be appreciated.
Thanks,
SunnySlp
- Sunny_Slp
- December 03, 2011
- Like
- 0
- Continue reading or reply
Inner SOQL query and governor limits
Hi Everyone,
I'm trying to retrieve Partial_Control_Group__c records connected via junction object CSAP_CGLP_Junction__c to CRD__c
here is my query:
pcgList=[SELECT Id,Name,CSAP_Control_ID__c,CSAP_Plan_ID__c FROM Partial_Control_Group__c WHERE Id IN (SELECT Partial_Control_Group__c FROM CSAP_CGLP_Junction__c WHERE CRD__c=:sourceCrdId) ORDER BY Name]; /*build string*/ for(Partial_Control_Group__c pcg:pcgList){ s=s+pcg.get('CSAP_Control_ID__c')+pcg.get('CSAP_Plan_ID__c')+','; }
is it safe (in terms of governor limits) to use inner query in this case? there are 2000-3000 records for each CRD__c and I'm worried about hitting any governor limits...would you call this safe way to do it or is there another even better way ?
Thank you,
SunnySlp
- Sunny_Slp
- November 28, 2011
- Like
- 0
- Continue reading or reply
Adding elements to List
Hi everyone, I was trying to add elements to a list and for some reason I cannot understand, the code replaces all the elements with the most recent one.
GMFXmlWriter_ValueOnly handle=new GMFXmlWriter_ValueOnly(); Map<String,String> parentMap=new Map<String,String>(); Map<String,String> child=new Map<String,String>(); List<Map<String,String>> childMap=new List<Map<String,String>>(); parentMap.put('sampleParent_name1','sampleParent_value1'); parentMap.put('sampleParent_name2','sampleParent_value2'); child.put('samplechild1_elem1','samplechild1_value1'); child.put('samplechild1_elem2','samplechild1_value2'); childMap.add(child); child.clear(); child.put('samplechild2_elem1','samplechild2_value1'); child.put('samplechild2_elem2','samplechild2_value2'); childMap.add(child);
After running the above code, childMap has
USER_DEBUG [24]|DEBUG|({samplechild2_elem1=samplechild2_value1, samplechild2_elem2=samplechild2_value2}, (already output))
basically, it has samplechild2 twice. I can't figure what I'm doing wrong. Any help will be greatly appreciated.
Thanks,
Sunny_Slp
- Sunny_Slp
- October 25, 2011
- Like
- 0
- Continue reading or reply
Rendering outputText based on a List using IF
I'm using rendered attribute of the <apex:outputText> to display a section header only when the section has elements to display.
This is what I have
Note: copays_Retail is List of objects retruned by the controller method getcopays_Retail
<apex:outputText rendered="{!If(copays_Retail!=NULL,True,False)}"><b>Retail</b></apex:outputText> <apex:repeat value="{!copays_Retail}" var="cps">
this always hides the section header, if I use {!If(!copays_Retail!=NULL,true,false)} gives an error saying that NOT() function expected Boolean but found an Object. Using just copays_Retail!=NULL always hides it. I want the outputText element be displayed when copays_Retails is not NULL or has more than 0 elements. How do I acheive this?
Thank you,
Sunny_Slp
- Sunny_Slp
- October 05, 2011
- Like
- 0
- Continue reading or reply
XML version of record
I'm trying to create an XML document from a select set of fields of an object. I decided to use XmlStreamWriter class.
To write <fieldlabel1>fieldlabel1_value</fieldlabel1>
<fieldlabel2>fieldlabel2_value</fieldlabel2> and so on
I made a List<string> fieldstoInclude that has all the fields to include in XML
for(String s : fieldstoInclude){
w.writeStartElement(null,s,null);
//how to write value?
w.writeEndElement();
}
My question here is, since WriteCharacter only takes Text and fields of an object can be of varying types, what is the best way to go ahead and do this?
I was thinking of making a map<string,string> with field labels as Map's keys and field values converted into strings as Map's value. There are hundereds of fields and I don't want to write code to convert each field manually. Is there a way to do this?
Any help will be greatly appreaciated.
Thank you,
Sunny_Slp
- Sunny_Slp
- September 28, 2011
- Like
- 0
- Continue reading or reply
Fields missing on outbound message WSDL
Hi Everyone, I have the following fields selected for outbound message
- Id
- Plan_Platform__c
- Pricing_Schedule__c
- Risk_Indicator__c
- RxPlanDataExp__c
- RxPlanData__c
- Rx_PP_ID__c
- State__c
- TP_ID__c
- but when I look at the generated WSDL, I see
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"xmlns:tns="http://soap.sforce.com/2005/09/outbound" xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:ent="urn:enterprise.soap.sforce.com" xmlns:ens="urn:sobject.enterprise.soap.sforce.com"targetNamespace="http://soap.sforce.com/2005/09/outbound"> <types> <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"targetNamespace="urn:enterprise.soap.sforce.com"> <!-- Our simple ID Type --> <simpleType name="ID"> <restriction base="xsd:string"> <length value="18"/> <pattern value="[a-zA-Z0-9]{18}"/> </restriction> </simpleType> </schema> <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"targetNamespace="urn:sobject.enterprise.soap.sforce.com"> <import namespace="urn:enterprise.soap.sforce.com"/> <!-- Base sObject (abstract) --> <complexType name="sObject"> <sequence> <element name="fieldsToNull" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/> <element name="Id" type="ent:ID" nillable="true"/> </sequence> </complexType> <complexType name="AggregateResult"> <complexContent> <extension base="ens:sObject"> <sequence> <any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded" processContents="lax"/> </sequence> </extension> </complexContent> </complexType> <complexType name="CRD__c"> <complexContent> <extension base="ens:sObject"> <sequence> <element name="Plan_Platform__c" nillable="true" minOccurs="0" type="xsd:string"/> <element name="Rx_PP_ID__c" nillable="true" minOccurs="0" type="xsd:string"/> <element name="State__c" nillable="true" minOccurs="0" type="xsd:string"/> <element name="TP_ID__c" nillable="true" minOccurs="0" type="xsd:string"/> </sequence> </extension> </complexContent> </complexType>
Fields such as RxPlanData,RxPlanDataExp,Rx_PP_ID,Risk_Indicator are absent? is there something wrong here?
- Sunny_Slp
- September 20, 2011
- Like
- 0
- Continue reading or reply
How to display select list of Fields
Hi Everyone,
I'm creating PDF version of an object. This object has around 400 fields out of which only 120 have to be displayed (predefined list). I don't want to use form elements as they don't render properly on PDF.
What I'm hoping for
. .
Name Value
Field Name1 | Field Value1 |
Field Name2 | Field Value2 |
Field Name120 | Field Value120 |
the only solution, I could figure out was
<apex:outputText>{!$ObjectType.Detriot__c.Fields.Name.Label}</apex:outputText>
<apex:outputText>{!field1}</apex:outputText}
in side a <table> tag.
but there are 120 fields and I have to do this for 30 more objects.Hardcoding doesn't seem like a good approach. Is there a more elegant way to do this? is there a way to perhaps make a list of field names and a list of values, then display those two lists as a table?
Thank you,
Sunny_Slp
- Sunny_Slp
- September 18, 2011
- Like
- 0
- Continue reading or reply
Web API SSL cert
Hi Everyone,
When we log into salesforce.com via webAPI, does it use SSL? if so, where can I get the cert to store in client app's keystore?
Thanks for any help,
Sunny_Slp
- Sunny_Slp
- September 15, 2011
- Like
- 0
- Continue reading or reply
Outbound Message- ACK URL
Hi Everyone,
When returning ACK for an outbound message, what URL should I use? (is it enterprise URL?)
also, should I include notification ID in ACK? I'm not sure how SFDC identifies which message I acknowledged.
Thanks for any help,
Sunny_Slp
- Sunny_Slp
- September 15, 2011
- Like
- 0
- Continue reading or reply
Outbound message with Changing fields
Hi everyone,
I'm integrating saleforce with an external system and I'm using outbound messaging to send object KLOT. The problem: New fields are added to KLOT once in a while and some of these fields will end up on the outbound message.
My Questions:
- I wanted to understand what changes this would entail on the external system.
- Do they need to implement the changed WSDL everytime?
- Can one consume outbound message without importing OM's WSDL from SFDC? and how? I ask because, if they can get the XML stream/file itself (raw data?) from SFDC , they can go through the file and get the values by parsing it?
Any help will be greatly appreciated, I'm stuck and in dire need of advice from more experienced developers.
Sunny_Slp
- Sunny_Slp
- August 22, 2011
- Like
- 0
- Continue reading or reply
Outbound message delivery
Hi Everyone,
How do I know if an outbound messag was successfully delivered (without checking with the external system)? does an empty "Outbound Messaging Statu" mean a success? The workflow rule is being triggered correctly.
I appreciate any help.
Thank you,
Sunny_Slp
- Sunny_Slp
- August 16, 2011
- Like
- 0
- Continue reading or reply
Custom field history tracking
Hey everyone,
We're trying to track 20+ fields on one custom object (Candidate__c), and since SFDC only allows for 20, I though of having a trigger on that custom object that gets triggered for insert,update. The plan was then to go ahead and
create a Candidate_History record with parentId=Candiaterecord.Id, Field=Field22,NewValue=Trigger.new[0].Field22,OldValue=Trigger.old[0].Field22; and then insert it?
the webAPI document says History objects of custom objects support create(), I assumed it would mean we can create and insert the object?
Here is a scaled down example of what I'm trying to do, is this even possible? I'm getting some wierd DML exceptions with no error message to know what exactly happend.
trigger candidateAudit on Candidate__c (after insert, after update) {
Candidate__c currentobject=Trigger.new[0]; Candidate__History historyrecord=new Candidate__History(parentId=currentobject.Id);
insert historyrecord;
}
- Sunny_Slp
- August 10, 2011
- Like
- 0
- Continue reading or reply
Data Integration through Apex Callouts
Hi everyone,
I'm currently working on a project that integrates salesforce with an in-house system/external system. We will be sending around 500 fields of data(Approx) to this external system in realtime (depending on various conditions).
Our original design was to use "Outbound Message" , but the external system security team is very particualr about authentication, they do not support IP flitering nor Mutual Authentication, which would have made things easy. Since, Outbound message can't be customized as a workaround there were proposals for using "Callouts" with username and password embedded in HTTP header. To summarize, a callout will be made with username and password embedded within the HTTP header ; all data (to be sent) will be included as callout's arguments(~500). The external system would then authenticate based on username password and would go on to processes included data/arguments.
I would like to know, if it is advisable to use "Callouts" when trying to send large number fields? I'm having a hard time imagining a callout with ~500 arguments.
Any help will be greatly appreaciate.
Thanks,
Sunny_Slp
- Sunny_Slp
- August 03, 2011
- Like
- 0
- Continue reading or reply
Narrower SFDC IP range
Hi Folks,
We're trying to intergrate SFDC with an external system via outbound message, as a security measure I have asked the external system team to lock down their client to only receive message from:
204.14.232.0/21
96.43.144.0/20
the security team on the external system requested a narrower range, as they don't normally open accesses to such broad range of IP addresses.
Is there a way to know the exact(or narrower range) IP address of my organization (both for sandbox and production)? and secondly is there a risk that this IP range (if there is even a way to find that out in the first place) changes over time?
Thanks,
Sunny_Slp
- Sunny_Slp
- July 11, 2011
- Like
- 0
- Continue reading or reply
Call Apex class from Workflow/Approval rules
Hi Everyone,
The project I'm currently working on requires that whenever a new record (SLS , a custom object) is a created and after it gets approved by a manager a pdf version of the record should generated, a case object should be created and the pdf will be attached to that case object and will be sent over using salesforce2salesforce connection.
I have written the code to do this (pdfCreator class), but the problem is how do I call this class?
The pdf creation, case record creation and the attachmet should happen after the SLS record is approved (uses approval rules) by a manager. So the event that should cause this class to run ( however indirect that may be) is the approval's final actions.
I can't use a trigger (After update on SLS by updating a dummy field on SLS ) to call pdfCreator as getContent() can't be called using triggers. Is there any other way that I can call this class (pdfCreator) that creates case object, generates pdf version of SLS and attaches it to case object and sends it over via sfdc2sfdc.
Thank you,
Sunny_Slp
- Sunny_Slp
- June 28, 2011
- Like
- 0
- Continue reading or reply
Authentication and Outbound message
Hi everyone,
I'm trying to integrate SFDC to an external system using outbound messages, The external system's security policy requires some sort of authentication. Is it possible to authenticate with an outbound message?
more specifically, can we include HTTP basic or Digest access authentication headers with an outbound message? or if there are other ways to authenticate an outbound message can someone please provide the details.
Any help will be greatly apperciated.
Thank you,
Sunny_Slp
- Sunny_Slp
- June 23, 2011
- Like
- 0
- Continue reading or reply
Exposing Apex methods as web services Question
Hi Everyone, I'm trying to understand how to expose Apex methods as webservices using webservice keyword.
Here is what I understood, after creating a web service method in an apex class, I generate the WSDL for that class and hand it over to the external application developer.
What I don't understand is, will the external developer be required to call login() method ? ( as we do in web API)
consider the following class:
global class MyWebService {
webService static Id makeContact(String lastName, Account a) {
Contact c = new Contact(lastName = 'Weissman', AccountId = a.Id);
insert c;
return c.id;
}
}
how do we call MyWebService.makeContact method? do we have to use connection/binding ? ( as we do in web API)
Finally , can we use any of the web API calls (like retrieve() ) within the client (when it only has WSDL from this particular class) ?
Any help will be greatly appreciated.
Thank you,
Sunny_Slp
- Sunny_Slp
- June 20, 2011
- Like
- 0
- Continue reading or reply
How to send PDF versions of records to external server
Hi everyone, I have a requirement where, whenever a new record (of a custom object) is created a PDF version of this record should be sent to an external server.
I thought of creating a visualforce page that generates the required PDF document and then write apex code to attach the PDF to another object ( created for this very purpose). Then use outbound message to send the object along with the attachment ( which now has the PDF document) to an external server but I realized outbound messaging cannot be used to send attachments of an object.
If generating and sending a PDF document cannot be based on a save event, is it possible to send the PDF documents of records(created on that day) to an external service? (so, instead of sending everytime a new record is created; send it once a day)
Any help will be greatly appreciated.
Thank you,
Sunny Slp
- Sunny_Slp
- June 14, 2011
- Like
- 0
- Continue reading or reply
Inner SOQL query and governor limits
Hi Everyone,
I'm trying to retrieve Partial_Control_Group__c records connected via junction object CSAP_CGLP_Junction__c to CRD__c
here is my query:
pcgList=[SELECT Id,Name,CSAP_Control_ID__c,CSAP_Plan_ID__c FROM Partial_Control_Group__c WHERE Id IN (SELECT Partial_Control_Group__c FROM CSAP_CGLP_Junction__c WHERE CRD__c=:sourceCrdId) ORDER BY Name]; /*build string*/ for(Partial_Control_Group__c pcg:pcgList){ s=s+pcg.get('CSAP_Control_ID__c')+pcg.get('CSAP_Plan_ID__c')+','; }
is it safe (in terms of governor limits) to use inner query in this case? there are 2000-3000 records for each CRD__c and I'm worried about hitting any governor limits...would you call this safe way to do it or is there another even better way ?
Thank you,
SunnySlp
- Sunny_Slp
- November 28, 2011
- Like
- 0
- Continue reading or reply
Adding elements to List
Hi everyone, I was trying to add elements to a list and for some reason I cannot understand, the code replaces all the elements with the most recent one.
GMFXmlWriter_ValueOnly handle=new GMFXmlWriter_ValueOnly(); Map<String,String> parentMap=new Map<String,String>(); Map<String,String> child=new Map<String,String>(); List<Map<String,String>> childMap=new List<Map<String,String>>(); parentMap.put('sampleParent_name1','sampleParent_value1'); parentMap.put('sampleParent_name2','sampleParent_value2'); child.put('samplechild1_elem1','samplechild1_value1'); child.put('samplechild1_elem2','samplechild1_value2'); childMap.add(child); child.clear(); child.put('samplechild2_elem1','samplechild2_value1'); child.put('samplechild2_elem2','samplechild2_value2'); childMap.add(child);
After running the above code, childMap has
USER_DEBUG [24]|DEBUG|({samplechild2_elem1=samplechild2_value1, samplechild2_elem2=samplechild2_value2}, (already output))
basically, it has samplechild2 twice. I can't figure what I'm doing wrong. Any help will be greatly appreciated.
Thanks,
Sunny_Slp
- Sunny_Slp
- October 25, 2011
- Like
- 0
- Continue reading or reply
XML version of record
I'm trying to create an XML document from a select set of fields of an object. I decided to use XmlStreamWriter class.
To write <fieldlabel1>fieldlabel1_value</fieldlabel1>
<fieldlabel2>fieldlabel2_value</fieldlabel2> and so on
I made a List<string> fieldstoInclude that has all the fields to include in XML
for(String s : fieldstoInclude){
w.writeStartElement(null,s,null);
//how to write value?
w.writeEndElement();
}
My question here is, since WriteCharacter only takes Text and fields of an object can be of varying types, what is the best way to go ahead and do this?
I was thinking of making a map<string,string> with field labels as Map's keys and field values converted into strings as Map's value. There are hundereds of fields and I don't want to write code to convert each field manually. Is there a way to do this?
Any help will be greatly appreaciated.
Thank you,
Sunny_Slp
- Sunny_Slp
- September 28, 2011
- Like
- 0
- Continue reading or reply
Fields missing on outbound message WSDL
Hi Everyone, I have the following fields selected for outbound message
- Id
- Plan_Platform__c
- Pricing_Schedule__c
- Risk_Indicator__c
- RxPlanDataExp__c
- RxPlanData__c
- Rx_PP_ID__c
- State__c
- TP_ID__c
- but when I look at the generated WSDL, I see
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"xmlns:tns="http://soap.sforce.com/2005/09/outbound" xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:ent="urn:enterprise.soap.sforce.com" xmlns:ens="urn:sobject.enterprise.soap.sforce.com"targetNamespace="http://soap.sforce.com/2005/09/outbound"> <types> <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"targetNamespace="urn:enterprise.soap.sforce.com"> <!-- Our simple ID Type --> <simpleType name="ID"> <restriction base="xsd:string"> <length value="18"/> <pattern value="[a-zA-Z0-9]{18}"/> </restriction> </simpleType> </schema> <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"targetNamespace="urn:sobject.enterprise.soap.sforce.com"> <import namespace="urn:enterprise.soap.sforce.com"/> <!-- Base sObject (abstract) --> <complexType name="sObject"> <sequence> <element name="fieldsToNull" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/> <element name="Id" type="ent:ID" nillable="true"/> </sequence> </complexType> <complexType name="AggregateResult"> <complexContent> <extension base="ens:sObject"> <sequence> <any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded" processContents="lax"/> </sequence> </extension> </complexContent> </complexType> <complexType name="CRD__c"> <complexContent> <extension base="ens:sObject"> <sequence> <element name="Plan_Platform__c" nillable="true" minOccurs="0" type="xsd:string"/> <element name="Rx_PP_ID__c" nillable="true" minOccurs="0" type="xsd:string"/> <element name="State__c" nillable="true" minOccurs="0" type="xsd:string"/> <element name="TP_ID__c" nillable="true" minOccurs="0" type="xsd:string"/> </sequence> </extension> </complexContent> </complexType>
Fields such as RxPlanData,RxPlanDataExp,Rx_PP_ID,Risk_Indicator are absent? is there something wrong here?
- Sunny_Slp
- September 20, 2011
- Like
- 0
- Continue reading or reply
Outbound Message- ACK URL
Hi Everyone,
When returning ACK for an outbound message, what URL should I use? (is it enterprise URL?)
also, should I include notification ID in ACK? I'm not sure how SFDC identifies which message I acknowledged.
Thanks for any help,
Sunny_Slp
- Sunny_Slp
- September 15, 2011
- Like
- 0
- Continue reading or reply
Outbound message delivery
Hi Everyone,
How do I know if an outbound messag was successfully delivered (without checking with the external system)? does an empty "Outbound Messaging Statu" mean a success? The workflow rule is being triggered correctly.
I appreciate any help.
Thank you,
Sunny_Slp
- Sunny_Slp
- August 16, 2011
- Like
- 0
- Continue reading or reply
Custom field history tracking
Hey everyone,
We're trying to track 20+ fields on one custom object (Candidate__c), and since SFDC only allows for 20, I though of having a trigger on that custom object that gets triggered for insert,update. The plan was then to go ahead and
create a Candidate_History record with parentId=Candiaterecord.Id, Field=Field22,NewValue=Trigger.new[0].Field22,OldValue=Trigger.old[0].Field22; and then insert it?
the webAPI document says History objects of custom objects support create(), I assumed it would mean we can create and insert the object?
Here is a scaled down example of what I'm trying to do, is this even possible? I'm getting some wierd DML exceptions with no error message to know what exactly happend.
trigger candidateAudit on Candidate__c (after insert, after update) {
Candidate__c currentobject=Trigger.new[0]; Candidate__History historyrecord=new Candidate__History(parentId=currentobject.Id);
insert historyrecord;
}
- Sunny_Slp
- August 10, 2011
- Like
- 0
- Continue reading or reply
Data Integration through Apex Callouts
Hi everyone,
I'm currently working on a project that integrates salesforce with an in-house system/external system. We will be sending around 500 fields of data(Approx) to this external system in realtime (depending on various conditions).
Our original design was to use "Outbound Message" , but the external system security team is very particualr about authentication, they do not support IP flitering nor Mutual Authentication, which would have made things easy. Since, Outbound message can't be customized as a workaround there were proposals for using "Callouts" with username and password embedded in HTTP header. To summarize, a callout will be made with username and password embedded within the HTTP header ; all data (to be sent) will be included as callout's arguments(~500). The external system would then authenticate based on username password and would go on to processes included data/arguments.
I would like to know, if it is advisable to use "Callouts" when trying to send large number fields? I'm having a hard time imagining a callout with ~500 arguments.
Any help will be greatly appreaciate.
Thanks,
Sunny_Slp
- Sunny_Slp
- August 03, 2011
- Like
- 0
- Continue reading or reply
Call Apex class from Workflow/Approval rules
Hi Everyone,
The project I'm currently working on requires that whenever a new record (SLS , a custom object) is a created and after it gets approved by a manager a pdf version of the record should generated, a case object should be created and the pdf will be attached to that case object and will be sent over using salesforce2salesforce connection.
I have written the code to do this (pdfCreator class), but the problem is how do I call this class?
The pdf creation, case record creation and the attachmet should happen after the SLS record is approved (uses approval rules) by a manager. So the event that should cause this class to run ( however indirect that may be) is the approval's final actions.
I can't use a trigger (After update on SLS by updating a dummy field on SLS ) to call pdfCreator as getContent() can't be called using triggers. Is there any other way that I can call this class (pdfCreator) that creates case object, generates pdf version of SLS and attaches it to case object and sends it over via sfdc2sfdc.
Thank you,
Sunny_Slp
- Sunny_Slp
- June 28, 2011
- Like
- 0
- Continue reading or reply
Authentication and Outbound message
Hi everyone,
I'm trying to integrate SFDC to an external system using outbound messages, The external system's security policy requires some sort of authentication. Is it possible to authenticate with an outbound message?
more specifically, can we include HTTP basic or Digest access authentication headers with an outbound message? or if there are other ways to authenticate an outbound message can someone please provide the details.
Any help will be greatly apperciated.
Thank you,
Sunny_Slp
- Sunny_Slp
- June 23, 2011
- Like
- 0
- Continue reading or reply
Exposing Apex methods as web services Question
Hi Everyone, I'm trying to understand how to expose Apex methods as webservices using webservice keyword.
Here is what I understood, after creating a web service method in an apex class, I generate the WSDL for that class and hand it over to the external application developer.
What I don't understand is, will the external developer be required to call login() method ? ( as we do in web API)
consider the following class:
global class MyWebService {
webService static Id makeContact(String lastName, Account a) {
Contact c = new Contact(lastName = 'Weissman', AccountId = a.Id);
insert c;
return c.id;
}
}
how do we call MyWebService.makeContact method? do we have to use connection/binding ? ( as we do in web API)
Finally , can we use any of the web API calls (like retrieve() ) within the client (when it only has WSDL from this particular class) ?
Any help will be greatly appreciated.
Thank you,
Sunny_Slp
- Sunny_Slp
- June 20, 2011
- Like
- 0
- Continue reading or reply
Is there any way to know in which tab the user is through VFP?
Hi All,
I want know in which tab is user in through VFP. My details scenario is as follows:
I have a Case Pgae Layout within which we have a visualforce page. This Case Layout can be accessed by Case tab and also through console. So my question is how can I know where is User present in Console tab or in Case tab. Any working example to achieve this would be highly appreciated.
Regards,
Lakshman
- Lakshman
- June 14, 2011
- Like
- 0
- Continue reading or reply
How to send PDF versions of records to external server
Hi everyone, I have a requirement where, whenever a new record (of a custom object) is created a PDF version of this record should be sent to an external server.
I thought of creating a visualforce page that generates the required PDF document and then write apex code to attach the PDF to another object ( created for this very purpose). Then use outbound message to send the object along with the attachment ( which now has the PDF document) to an external server but I realized outbound messaging cannot be used to send attachments of an object.
If generating and sending a PDF document cannot be based on a save event, is it possible to send the PDF documents of records(created on that day) to an external service? (so, instead of sending everytime a new record is created; send it once a day)
Any help will be greatly appreciated.
Thank you,
Sunny Slp
- Sunny_Slp
- June 14, 2011
- Like
- 0
- Continue reading or reply
How to Call WebService Method in Java
Hi all,
I am trying to use apex class webService method in java. But it is giving following error
Details are as following
Apex Class
Java Code:
public class trySendingEmail {
public static void main(String[] args) throws Exception {
login(); //general login code in method
//sendEmail();
WebServiceAccountPlanBindingStub wbind = new WebServiceAccountPlanBindingStub();
Plan vPlan = new Plan();
vPlan.setName( "Namita");
vPlan.setPlanId("abcdNewPlan");
vPlan.setPlanningPeriod(null);
vPlan.setPlanNumber(1234);
// This line gives the error
Plan endresult = wbind.createAccountPlan(vPlan);
//System.out.println("----------------"+endresult);
}
}
Can anybody please tell me where am i going wrong
- TryCoding
- March 28, 2011
- Like
- 0
- Continue reading or reply