• HarryB
  • NEWBIE
  • 5 Points
  • Member since 2004

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 34
    Questions
  • 50
    Replies

Hi,

 

I have to get this implemented and just don't know how:

 

When a user edits a record (opportunity to be exact) and hits "Save", a "before update" trigger should display a note message (via addError) - however if the user hits "Save" again, the record should be saved. So I have to get rid of addError in the 2nd run of the trigger...

 

Any input appriciated!

 

Cheers,

Harry

 

Hi all,

 

I am currently trying to set up a site/vp page/apex class that updates certain CampaignMember records - without any prior login, so for "guest users". So far all I get is the apex error message "INSUFFICIENT_ACCESS_OR_READONLY, insufficient access rights on object id:" when doing the actual update (CampaignMember) call.

I guess this means I have to grant write access rights for user "guest" on the CampaignMember object. Now, I don't seem to find this in the users setup at all. "Campaign" is there, but no "CampaignMember".

 

Any idea how to have this done? TIA!

 

Regards,

Harry

  • December 09, 2010
  • Like
  • 0

Hi all,

 

there seem to be two different ways of adding files to chatter. For example, if you click on the "attach a file" button, it will give you two alternatives:

 

a) Select a file from Salesforce

b) Upload a file from your computer

 

On a) you would have to add a file to your Content (in Workspaces) first

 

Now, as far as I assumed before, both should lead to the same entries in the chatter feed. However, there is one detail, that differs:

 

All my entries created with method a) will have an additial link "Go to Content Detail Page".

 

Now my core problem is that I need to find a way to create chatter file posts of type a) using the API, so far all my tries ended up as type b), so missing "Go to Content Detail Page" link.

 

What I'm doing so far:

- Adding a "ContentVersion" record (=doing a file upload)

- Using the Id of the created ContentVersion to add a "FeedPost" record and pointing its "ParentId" to the object that should list the new Chatter post

 

So, what am I missing here?

 

Cheers,

Harry

  • November 01, 2010
  • Like
  • 0

Hi all,

 

just wrote a trigger that should be executed every time an attachment is deleted ("before delete attachment"). As long as I just delete attachments, this one works like a charm.

Now comes the big "but": If I delete an email with an attachment or even a case that contains an email with attachment, the trigger is not fired, although all related objects (case, email, attachment) are being removed in the process.

 

Why won't the trigger work as its supposed to be?

 

Regards,

Harry

Hello,

 

is it possible to concatenate multiple existing PDFs using Apex (maybe stored as documents)? How about make changes to an existing PDF and then save the updated PDF?

 

Cheers,

HarryB

Hi there,
 
how is one supposed to create an "OpportunityPartner" object using the API? According to the Apex Explorer this object is only query-able and retrieve-able, so basically a readonly construction.
 
So, is creating/updating a new OpportunityPlan plain impossible is there just a trick that I'm unaware of? 
 
Cheers,
Harry
  • October 02, 2008
  • Like
  • 0
Hi all,
 
it seems that if I use the update API call to modify more than one sObject, any connected workflow will be only triggered once per update call and not for every single sObject.
 
Is this a known limitation and is there a workaround maybe? The only "solution" seems to be to do single updates for every sObject, but this is very time consuming if one need to modify some 1000 records...
 
Cheers, Harry
Hi all,
 
I was just trying to set up a validation rule that uses a field of type 'multiselect picklist'. Unfortunately it is possible at all - the field is not available using the "add field" dialogue of the rule editor. To be exact, the list of all available fields is simply missing all names of  'multiselect picklist' fields.
 
Is this a bug or simply bad design?
 
Cheers,
Harry
  • March 06, 2008
  • Like
  • 0
Hi all,
 
the problem is as follows:
I need to set up a workflow that creates two tasks if these rules match:
- opportunity stage has a certain value
- The opportunity has at least one product with a certain "product code"
 
Now our internal work procedure requires us to first add new products to the opportunity and then switch the opportunity stage to the desired "trigger value" that should fire the workflow.
 
Option A:
Chose "Opportunity" as workflow trigger object. The show stopper is that its not possible to use opportunity products in the workflow rules - their fields are simply not listed in the dropdown lists.
 
Option B:
Chose "Opportunity Product" as workflow trigger object. Now you can set up all rules fine. The "oops" comes when you try to fire the new workflow by creating an opportunity that matches both rules mentioned above.
If you set the opportunity stage to the right value and after that add one matching product, all works perfect - but this just isn't the way we work. If you do it the other way around (select the product and then set the opportunity stage), the workflow won't be fired at all...
 
Any ideas on this one?
 
Cheers,
Harry
  • February 18, 2008
  • Like
  • 0
Hi all,
 
I need to detect any price change of products and then use the data of an change product to update an external database - so is has to be near realtime and a "polling" scenario in certain intervals won't work.
 
As far as I found out, one can neither create a workflow on the "pricebookEntry" object (together with an outgoing call), nor does Apex allow to define a trigger on "pricebookEntry".
 
Is there any other way that might be usable to trigger an external script as soon as a product price has been changed?
 
TIA & Cheers,
Harry
 
 
  • January 15, 2008
  • Like
  • 0
Hi all,
 
we just made another WebToLead implementation for a customer - mostly using the HTML form code generated by Salesforce itself.
 
There are two changes we made:
In the "standard" HTML code the included fields "Campaign_ID" and "recordType" were both selection boxes with several values. The customer just wants one specific Campaign assigned and one fixed Lead-Recordtype set, so we changed both to "hidden" HTML fields with the correct element ID as value.
 
Now, when you submit this WebToLead a couple of times, there is this odd behaviour on the created Leads:
- Campaign will be set correctly in most of the cases, but it is missing sometimes (no Campaign assigned)
- Lead-Recordtype won't be set at all (defaults to "Standard")
 
We have checked the code for any typos - without success. How can it be that the functionality of WebToLead is unpredictable (Campaign) or not even existing (Lead-Recordtype)?
 
Cheers,
Harry
  • November 16, 2007
  • Like
  • 0
Here is what I want to set up:
 
Someone is entering/editing an Account. If one Account field has a certain value/input, a dialogue window should be displayed, having two possible option buttons/links ("Yes"/"No"). If the user clicks on any of these buttons, some fields of the current Account should be updated accordingly.
 
Is there any way to accomplish this - apart from Apex Code, which is not available for me atm?
 
TIA,
Harry 
  • October 30, 2007
  • Like
  • 0
Hi there,
 
I'm currently looking to find a way to enable a S-Control to be executed in an Edit page layout only.
The S-Control should be placed to the Edit screen of a child object of Opportunities and then pre-fill an input field with the data/content of an Opportunity field.
 
So far I am only able to place a S-Control in the Detail page layout, but it won't be shown/executed during Edit.
 
Is there any other way (except using a S-Control) to achieve this? If there is nothing, the only other way I could think of is to overwrite the field after Edit using an Outgoing Message. 
 
TIA for any hints or comments!
 
Cheers,
Harry
  • August 27, 2007
  • Like
  • 0
Hi,
 
there seems to be a new feature in SF7 that should (imho) prevent data loss, if two users edit the same record at the same time and then save their changes one after another. Example:
 
User A hits "Edit" on a contact, starts to change some details and then gets a phone call.
At this time user B edits the same contact, does his own modifications and saves them.
User A finishes his call and hits "Save" too - he'll get a message page to inform him, that he can not save his changes - he has to reload the record instead, gets the data modified by User B and has to redo his changes.
 
Nice feature so far.
 
Now lets assume that there is a workflow and an outbout message connected to all Contact modifications, which execute a script that does some calculation with various Contact data and then updates another Contact field with the result. This whole procedure will take some seconds for the message to fire and the script to run. Over that every outgoing message uses a fixed user that has to be defined on message setup (so not the actual user that fired the workflow and message in the first place!).
 
Another example:
User A edits a contact and saves it. Now the workflow is triggered, the script takes some time to finish. Before its even done, User A decides to edit the same contact again, during which the script ends and updates the contact in the background. Now User A hits "Save" and gets the message "Congratulations, your changes are lost" ;-)
 
This is no made up scenario - in fact it happens a lot on a customer, which had no problems up to the release of SF7.
 
Now the golden question - is there any way to get around this dilemma?
 
Can one disable this great new "edit locking" feature somewhere?
Can certain users be excluded of this locking mechanism - meaning their changes won't trigger it?
Is there a way to get/use the ID/SessionID of the user that triggered a workflow/outbout message in a script called by the message?
 
Any help really appreciated!
 
Cheers,
Harry
  • August 16, 2007
  • Like
  • 0
Hi all,
 
is there a way to display an custom image in a page layout?
Like the "url" field type, just displaying the image defined by the path stored in the field.
 
Cheers,
Harry
Hello all,
 
we're experiencing some weird API related problems: Normally API login statements used to be executed within a few seconds (selects depending on the amount of data of course) - now since April 26th starting somewhere between 2 and 3 a.m. all login operations take a least 30 seconds!
 
I just wote a simple test script, consisting of a login and simple select, retrieve and update statements and tested several call combinations. The time necessary for the single API commands are as follows:
 
login: ~30 seconds
2nd operation (regardless whether its select, retrieve or update): 30 seconds and more (according to complexity)
3rd and 4th operation: no obvious delay
 
These delays happen on each script call, so this is no random phenomenon. APIs tested are 6 to 9, so no difference. Language used is PHP 4.3.x with NUSOAP.
 
Can this somehow be related to the end of "weak SSL support" of March 31st?
Why are just the two first API calls affected and not the 3rd and later?
 
Thanks in advance for any kind of hints or suggestions!
 
Cheers,
Harry
Hello,
 
I'm currently trying to get the new API command "sendEmail" to work with PHP/nusoap - so far it is just throwing various error messages ;-)
 
Can someone please provide an example - PHP would be great, but an XML/SOAP snippet of the actual API call would to it as well. Thanks in advance!
 
Cheers,
Harry
  • April 11, 2007
  • Like
  • 0
Hi there,
 
for a client we have developed a script that deletes objects quite frequently. Now someone from Salesforce just called and told us, the recycle bin of that clients Salesforce was totally clogged by all the deleted objects - they had to kind of flush the thing manually.
 
Now I checked the API docs and judging from what I've read, all delete calls will just move the objects into the recycle bin - to make sure they can be undeleted later.
 
Is there any way to force a hard delete using the API, avoiding the recycle bin? Or is there any function to empty the recycle bin maybe?
 
TIA,
Harry
  • April 05, 2007
  • Like
  • 0
Hi there,
 
can someone plz verify that atm it is not possible to trigger any product price adding or modification, because the objects "Pricebook"/"PricebookEntry" are not available as source objects when defining a workflow?
 
Maybe this would be great idea to add in the next SF version.
 
Cheers,
Harry
  • March 28, 2007
  • Like
  • 0
Hi all,
 
according to the Spring '07 documentation, ConnectSAP should be located at Setup/Data Management. If I go there, the only program listed is the "Apex Data Loader". And yes, its an Enterprise account I'm using.
 
Thanks in advance for any hint.
 
Cheers,
Harry
  • March 21, 2007
  • Like
  • 0

Hi,

 

I have to get this implemented and just don't know how:

 

When a user edits a record (opportunity to be exact) and hits "Save", a "before update" trigger should display a note message (via addError) - however if the user hits "Save" again, the record should be saved. So I have to get rid of addError in the 2nd run of the trigger...

 

Any input appriciated!

 

Cheers,

Harry

Hi all,

 

just wrote a trigger that should be executed every time an attachment is deleted ("before delete attachment"). As long as I just delete attachments, this one works like a charm.

Now comes the big "but": If I delete an email with an attachment or even a case that contains an email with attachment, the trigger is not fired, although all related objects (case, email, attachment) are being removed in the process.

 

Why won't the trigger work as its supposed to be?

 

Regards,

Harry

Hi,

 

I want to update the Campaign Member Status using the Force.com Sites. I just want ot know how i can pass the Campaign Member Id the Force.comSites URL. I have written one Custom Controller which will update the Camapign Status. Here i hardcoded the Campaign Member. Please suggest me how to pass theCampaign Member Id to the Sites URL.

 

Ex Site URL:http://Mysites-developer-edition.na6.force.com/test?id=701800000009EWSX

 

"701800000009EWSX" This isCampaign Member Id.

 

 

Thanks

Srikanth.K

 
Hi all,
 
I was just trying to set up a validation rule that uses a field of type 'multiselect picklist'. Unfortunately it is possible at all - the field is not available using the "add field" dialogue of the rule editor. To be exact, the list of all available fields is simply missing all names of  'multiselect picklist' fields.
 
Is this a bug or simply bad design?
 
Cheers,
Harry
  • March 06, 2008
  • Like
  • 0
Hi all,
 
I need to detect any price change of products and then use the data of an change product to update an external database - so is has to be near realtime and a "polling" scenario in certain intervals won't work.
 
As far as I found out, one can neither create a workflow on the "pricebookEntry" object (together with an outgoing call), nor does Apex allow to define a trigger on "pricebookEntry".
 
Is there any other way that might be usable to trigger an external script as soon as a product price has been changed?
 
TIA & Cheers,
Harry
 
 
  • January 15, 2008
  • Like
  • 0
Hi there,
 
I'm currently looking to find a way to enable a S-Control to be executed in an Edit page layout only.
The S-Control should be placed to the Edit screen of a child object of Opportunities and then pre-fill an input field with the data/content of an Opportunity field.
 
So far I am only able to place a S-Control in the Detail page layout, but it won't be shown/executed during Edit.
 
Is there any other way (except using a S-Control) to achieve this? If there is nothing, the only other way I could think of is to overwrite the field after Edit using an Outgoing Message. 
 
TIA for any hints or comments!
 
Cheers,
Harry
  • August 27, 2007
  • Like
  • 0
Hi,
 
there seems to be a new feature in SF7 that should (imho) prevent data loss, if two users edit the same record at the same time and then save their changes one after another. Example:
 
User A hits "Edit" on a contact, starts to change some details and then gets a phone call.
At this time user B edits the same contact, does his own modifications and saves them.
User A finishes his call and hits "Save" too - he'll get a message page to inform him, that he can not save his changes - he has to reload the record instead, gets the data modified by User B and has to redo his changes.
 
Nice feature so far.
 
Now lets assume that there is a workflow and an outbout message connected to all Contact modifications, which execute a script that does some calculation with various Contact data and then updates another Contact field with the result. This whole procedure will take some seconds for the message to fire and the script to run. Over that every outgoing message uses a fixed user that has to be defined on message setup (so not the actual user that fired the workflow and message in the first place!).
 
Another example:
User A edits a contact and saves it. Now the workflow is triggered, the script takes some time to finish. Before its even done, User A decides to edit the same contact again, during which the script ends and updates the contact in the background. Now User A hits "Save" and gets the message "Congratulations, your changes are lost" ;-)
 
This is no made up scenario - in fact it happens a lot on a customer, which had no problems up to the release of SF7.
 
Now the golden question - is there any way to get around this dilemma?
 
Can one disable this great new "edit locking" feature somewhere?
Can certain users be excluded of this locking mechanism - meaning their changes won't trigger it?
Is there a way to get/use the ID/SessionID of the user that triggered a workflow/outbout message in a script called by the message?
 
Any help really appreciated!
 
Cheers,
Harry
  • August 16, 2007
  • Like
  • 0
Hi all,
 
is there a way to display an custom image in a page layout?
Like the "url" field type, just displaying the image defined by the path stored in the field.
 
Cheers,
Harry
Hello all,
 
we're experiencing some weird API related problems: Normally API login statements used to be executed within a few seconds (selects depending on the amount of data of course) - now since April 26th starting somewhere between 2 and 3 a.m. all login operations take a least 30 seconds!
 
I just wote a simple test script, consisting of a login and simple select, retrieve and update statements and tested several call combinations. The time necessary for the single API commands are as follows:
 
login: ~30 seconds
2nd operation (regardless whether its select, retrieve or update): 30 seconds and more (according to complexity)
3rd and 4th operation: no obvious delay
 
These delays happen on each script call, so this is no random phenomenon. APIs tested are 6 to 9, so no difference. Language used is PHP 4.3.x with NUSOAP.
 
Can this somehow be related to the end of "weak SSL support" of March 31st?
Why are just the two first API calls affected and not the 3rd and later?
 
Thanks in advance for any kind of hints or suggestions!
 
Cheers,
Harry
Hello,
 
I'm currently trying to get the new API command "sendEmail" to work with PHP/nusoap - so far it is just throwing various error messages ;-)
 
Can someone please provide an example - PHP would be great, but an XML/SOAP snippet of the actual API call would to it as well. Thanks in advance!
 
Cheers,
Harry
  • April 11, 2007
  • Like
  • 0
Hi there,
 
for a client we have developed a script that deletes objects quite frequently. Now someone from Salesforce just called and told us, the recycle bin of that clients Salesforce was totally clogged by all the deleted objects - they had to kind of flush the thing manually.
 
Now I checked the API docs and judging from what I've read, all delete calls will just move the objects into the recycle bin - to make sure they can be undeleted later.
 
Is there any way to force a hard delete using the API, avoiding the recycle bin? Or is there any function to empty the recycle bin maybe?
 
TIA,
Harry
  • April 05, 2007
  • Like
  • 0
I'm building a external application that will tie into the SalesForce interface using a S-Control in the hopes of eventually making a public application for the App Exchange.

I'm trying to uniquely identify the account and user of the application using the organization and user ids.

For example:
http://www.myserver.com/main.do?sfo={!$Organization.Id}&sfu={!$User.Id}

This would, of course, return an HTML page that would fill a panel in the SalesForce interface.

Is this a good way to proceed?  Is there a better way to do this?
  • March 27, 2007
  • Like
  • 0
Hi all,
 
according to the Spring '07 documentation, ConnectSAP should be located at Setup/Data Management. If I go there, the only program listed is the "Apex Data Loader". And yes, its an Enterprise account I'm using.
 
Thanks in advance for any hint.
 
Cheers,
Harry
  • March 21, 2007
  • Like
  • 0