-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
7Questions
-
6Replies
Make a picklist on a standard detail page "dependent" on a cross object formula...
Hello all,
Currently we have 2 custom fields on the case edit page layout. Picklist field2 is dependent on controlling field picklist field1. We want to change this so picklist field2 is dependent on a custom field on the Account so that the picklist is field2 is already filtered appropriately when the page loads.. ie.. Case.Contact.Account.customfield? Is this possible?
Thanks!
- sf consultant.ax380
- December 13, 2008
- Like
- 0
- Continue reading or reply
Use server side SUBSTITUTE function to remove carriage returns and line feeds while within an s-control?
User enters data in text area on standard field (non visual force page) return of save button has been overrriden to call an s-control. .S-control needs to populate the value of the merge field referencing that standard field in a javascript var and append it to the url for an iframe. (Seems simple)
PROBLEM
Darn CRLF's that are embedded in the Merge Field if user hits enter in the text area field cause disasterous results (unterminated string error) when applying the merge field value to a javascript var.
QUESTION
Why have I constantly been unsuccessful in using Substitute to remove the CRLF?? Has ANYONE gotten this to work?
I've read varous other hacks requiring additional presentation logic of hidden form fields or hidden divs working but this is not a read only field. The user is entering this right before the s-control is called. I've heard of maybe run an additonal query either using query or retrieve as opposed to evaling the merge field but this has not seemed to work for me either.
ie. .the below I am using to protect against single and double quotes but I've tried numerous deritives to project against carriage returns and Substitute just doesn't seem to want to do it.
var desc = encodeURI("{! Substitute(Substitute(Case.Description ,"\\","\\\\"),"\"","\\\"")}" );
Any help would be greatly appreciated as I've wasted numerous hours on this. (in any other scenario I would use the full service side power of java to remove unwanted stuff before applying to the javascript var but in the case of Force.com and using an s-control. from my understanding my server side capability in this context is somewhat limited.
Thank you!
Message Edited by sf consultant on 11-26-2008 07:56 AM
Message Edited by sf consultant on 11-26-2008 07:57 AM
Message Edited by sf consultant on 11-26-2008 07:58 AM
- sf consultant.ax380
- November 26, 2008
- Like
- 0
- Continue reading or reply
Web Services API / Soql / Child to parent / or clause no results ret w/o 2nd half of or clause rs ok
Maybe I'm just not understanding soql after years of using actual SQL. :) How can statement 1 (with or clause)below return 0 records while statement 2 (no or clause) returns records??? It's an "or" clause.. I'm not getting it!!
I would think no matter what the 2nd 1/2 of the or clause evals to the 1st part should still return me some records.
A cut and paste of the soql (with the or clause) into eclipse in the schema browser IS returning records.. I'm even more perplexed now.
The email parm is the same passed in both statements.The obect being evalued is the junction table in a many to many relationship.
binding.service.soap_address = https://www.salesforce.com/services/Soap/c/14.0
Someone please stop my madness and help!!! LOL
soql = " Select i.KBDocSubscribed_To__c " + " From INET_KBDocSubscription_Bridge__c i " + " Where KBDocSubscription_Parent__r.Email__c like '"+email+"%'" + " or KBDocSubscription_Parent__r.Contact__r.email like '" + email + "%'"; soql = " Select i.KBDocSubscribed_To__c " + " From INET_KBDocSubscription_Bridge__c i " + " Where KBDocSubscription_Parent__r.Email__c like '"+email+"%'";
.....
res = binding.query(soql);
.....
- sf consultant.ax380
- October 21, 2008
- Like
- 0
- Continue reading or reply
Sending Email via Java / Web Services API with Images embedded as Attachments? How can it be done?
We have users that create html documents on the fly in our application.. some may include images.. these images our stored in our DB as blobs.. Currently we use the javax.mail classes but want to switch to the SF Web Services API to send the email.
In our current version of our 3rd party application, HTML Images are included as
attachments to the email as opposed to absolute URL's as they are stored as
blobs in the database and do not exist on any file system. The HTML references
the images using the protocol prefix cid: and the content id of the attachment.
I’m looking at the SF web services API and trying to find something I can use to duplicate this. I see the setFileAttachments and setDocumentAttachments methods but I’m thinking these are not what I want to use?
Any ideas are appreciated!!!The below is more pseudo then actual code but you should get the idea.
-------Using the javax.mail classes........ messageBodyPart = new MimeBodyPart(); DataSource fds = new FileDataSource("C:\\images\\jht.gif"); messageBodyPart.setDataHandler(new DataHandler(fds)); messageBodyPart.setHeader("Content-ID","<image>"); multipart.addBodyPart(messageBodyPart); message.setContent(multipart); transport.connect(); transport.sendMessage(message, ---------in the SF web service API... com.sforce.soap.enterprise.SingleEmailMessage email = new SingleEmailMessage() email.setFileAttachments(i, _value) email.setFileAttachments(fileAttachments); email.setDocumentAttachments(i, _value) email.setDocumentAttachments(documentAttachments)
Message Edited by sf consultant on 09-09-2008 12:03 PM
- sf consultant.ax380
- September 09, 2008
- Like
- 0
- Continue reading or reply
Force.com Consultant Available.. Chicago / Remote.. CRM Integration.
Hello all,
I'm currently an independent consultant performing integration work for a
company called Instranet (Recently acquired by Salesforce.com) I've been
providing pre-sales as well as development work in the integration of
Instranets Knowledge Management tool and the Force.com platform.
I've proficient with Apex classes, Visual Force, s-controls, AJAX web service
API, and Force.com administration.
I will be available soon to provide consulting efforts in both a pre-sales as
well as post sales capacity. Resume is available on request.
Please email me at rnendza@gmail.com or call me at 630-310-0898.
Thanks!
Rick
- sf consultant.ax380
- August 29, 2008
- Like
- 0
- Continue reading or reply
Simulating a custom button / link in a VF Page?
Currently... on my case layout I have a custom link which calls an custom S-Control with the behavior
of Display in new window (ie.. popup) This s-control simply builds a bunch of querystring parms and changes the window's location to an external app passing these parms and then I'm good.
I have built a new VF page and I want to add the same functionality that custom link is providing on that standard case page.
Is there a way in VF to.............
1. reference this custom link and "drop it" on the page so as I can reuse all the existing code. (I don't think so)
2. maybe utilize a commandLink (I don't need a server side action called) and then in the onclick of the command link somehow tell it to utilize the existing custom s-control and popup a new window with specific height / width.. etc.???
The more I think about this the more I know I'm thinking about this all wrong!!! :)
Any help would be appreciated!!
Thanks
- sf consultant.ax380
- August 26, 2008
- Like
- 0
- Continue reading or reply
Customer Portal - Submitting a new case - overriding standard relevant solutions object
Cases/ create new case / hit continue / type password in the subject line and hit submit.
You should come to a page with the url similar to
I’ve searched high and low on all case page layouts / solution page layouts and all associated related lists and can’t find where to override this.Something similar appeared to be in the Solutions Search Layouts – Solutions Search Results. Okay fine but that doesn’t tell me how to override the containing page to not use this..
Any ideas ... Thanks all!
- sf consultant.ax380
- July 25, 2008
- Like
- 0
- Continue reading or reply
Use server side SUBSTITUTE function to remove carriage returns and line feeds while within an s-control?
User enters data in text area on standard field (non visual force page) return of save button has been overrriden to call an s-control. .S-control needs to populate the value of the merge field referencing that standard field in a javascript var and append it to the url for an iframe. (Seems simple)
PROBLEM
Darn CRLF's that are embedded in the Merge Field if user hits enter in the text area field cause disasterous results (unterminated string error) when applying the merge field value to a javascript var.
QUESTION
Why have I constantly been unsuccessful in using Substitute to remove the CRLF?? Has ANYONE gotten this to work?
I've read varous other hacks requiring additional presentation logic of hidden form fields or hidden divs working but this is not a read only field. The user is entering this right before the s-control is called. I've heard of maybe run an additonal query either using query or retrieve as opposed to evaling the merge field but this has not seemed to work for me either.
ie. .the below I am using to protect against single and double quotes but I've tried numerous deritives to project against carriage returns and Substitute just doesn't seem to want to do it.
var desc = encodeURI("{! Substitute(Substitute(Case.Description ,"\\","\\\\"),"\"","\\\"")}" );
Any help would be greatly appreciated as I've wasted numerous hours on this. (in any other scenario I would use the full service side power of java to remove unwanted stuff before applying to the javascript var but in the case of Force.com and using an s-control. from my understanding my server side capability in this context is somewhat limited.
Thank you!
Message Edited by sf consultant on 11-26-2008 07:56 AM
Message Edited by sf consultant on 11-26-2008 07:57 AM
Message Edited by sf consultant on 11-26-2008 07:58 AM
- sf consultant.ax380
- November 26, 2008
- Like
- 0
- Continue reading or reply
Web Services API / Soql / Child to parent / or clause no results ret w/o 2nd half of or clause rs ok
Maybe I'm just not understanding soql after years of using actual SQL. :) How can statement 1 (with or clause)below return 0 records while statement 2 (no or clause) returns records??? It's an "or" clause.. I'm not getting it!!
I would think no matter what the 2nd 1/2 of the or clause evals to the 1st part should still return me some records.
A cut and paste of the soql (with the or clause) into eclipse in the schema browser IS returning records.. I'm even more perplexed now.
The email parm is the same passed in both statements.The obect being evalued is the junction table in a many to many relationship.
binding.service.soap_address = https://www.salesforce.com/services/Soap/c/14.0
Someone please stop my madness and help!!! LOL
soql = " Select i.KBDocSubscribed_To__c " + " From INET_KBDocSubscription_Bridge__c i " + " Where KBDocSubscription_Parent__r.Email__c like '"+email+"%'" + " or KBDocSubscription_Parent__r.Contact__r.email like '" + email + "%'"; soql = " Select i.KBDocSubscribed_To__c " + " From INET_KBDocSubscription_Bridge__c i " + " Where KBDocSubscription_Parent__r.Email__c like '"+email+"%'";
.....
res = binding.query(soql);
.....
- sf consultant.ax380
- October 21, 2008
- Like
- 0
- Continue reading or reply
Sending Email via Java / Web Services API with Images embedded as Attachments? How can it be done?
We have users that create html documents on the fly in our application.. some may include images.. these images our stored in our DB as blobs.. Currently we use the javax.mail classes but want to switch to the SF Web Services API to send the email.
In our current version of our 3rd party application, HTML Images are included as
attachments to the email as opposed to absolute URL's as they are stored as
blobs in the database and do not exist on any file system. The HTML references
the images using the protocol prefix cid: and the content id of the attachment.
I’m looking at the SF web services API and trying to find something I can use to duplicate this. I see the setFileAttachments and setDocumentAttachments methods but I’m thinking these are not what I want to use?
Any ideas are appreciated!!!The below is more pseudo then actual code but you should get the idea.
-------Using the javax.mail classes........ messageBodyPart = new MimeBodyPart(); DataSource fds = new FileDataSource("C:\\images\\jht.gif"); messageBodyPart.setDataHandler(new DataHandler(fds)); messageBodyPart.setHeader("Content-ID","<image>"); multipart.addBodyPart(messageBodyPart); message.setContent(multipart); transport.connect(); transport.sendMessage(message, ---------in the SF web service API... com.sforce.soap.enterprise.SingleEmailMessage email = new SingleEmailMessage() email.setFileAttachments(i, _value) email.setFileAttachments(fileAttachments); email.setDocumentAttachments(i, _value) email.setDocumentAttachments(documentAttachments)
Message Edited by sf consultant on 09-09-2008 12:03 PM
- sf consultant.ax380
- September 09, 2008
- Like
- 0
- Continue reading or reply
How do I refresh SF from my popup?
- Jim F.ax281
- August 17, 2007
- Like
- 0
- Continue reading or reply
sforce control - hanging while accessing custom fields with carriage return
Hi
I am using a Custom Control to redirect our users to the Edit Contact Page.
I am also passing some account information in the query string.
This has been working fine, Except when trying to access one of our custom fields (an address field) where the user has put carriage returns in the data.
i.e.
17 Hammer Street
Hammer house
Now i am using javascript to redirect the user to the contact page. Whenever i try access the field that has carriage returns on it, the javascript does not seem to execute. Trying different accounts without this carriage return worked fine.
I tried replacing the carriage return, but cannot even get that far.
I reduced the script in the sforce control to the following:
<script language="JavaScript">
function showaddress()
{
alert("{!Account_WCF_Billing_Street}");
}
showaddress();
</script>
Again, this code runs fine for accounts in which this custom field has no carriage returns, yet just doesn't run for fields with carriage returns.
Any way around this, TIA
- GrantM
- June 28, 2005
- Like
- 0
- Continue reading or reply