• KerryGroup Dev
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 4
    Replies

I have an opportunity that I would like to undelete. I can find the data in the database using both Apex Explorer and through an APEX query if I use the ALL ROWS flag. I understand how to undelete using the apex command Undelete:

 

id OppId = '0068000000VVkwlAAD';
Opportunity opp = [select id, name from opportunity where id =: OppId ALL ROWS];

Database.UndeleteResult result = Database.Undelete(opp, false);
System.debug(result);

 

But... this record is not in the recycle bin. I get an error:

 |USER_DEBUG|[5,1]|DEBUG|Database.UndeleteResult[getErrors=(Database.Error[getFields=();getMessage=Entity is not in the recycle bin;getStatusCode=System.StatusCode.UNDELETE_FAILED;]);getId=0068000000VVkwlAAD;isSuccess=false;]

 

So the data is in the system... I just want to flip the isdeleted flag... Can I do this?

I have an approval process that has multiple approvers that all must approve before the process can continue. As they approve, one at a time, can I do a field update and update a field to the name of the latest approver?

 

I would expect this field to change to each name in turn as they approve.

 

I can make an approval action and create a field update, I am just not sure how to access the approvers name.

 

Any configuration option or APEX solutions out there?

 

Thanks!

There are numerous ways to setup security in Sales Force. It seems that all the various security settings boil down to one place: Sharing. Specifically I mean the sharing button on any private object.

 

Our opportunities are private, so I see this sharing button. When I click it I get a list of those users or groups that can view or edit this opportunity. There is another button called: Expand List.

 

Using that list I can view every single user that can view the opportunity.

 

My question: How do I determine if a user can view an object? Say I have a Sales Force UserID and a Sales Force Opportunity ID.

 

Is there anyway I can plug that into something and get out a “Yes they can see this” or “No they cannot see this”

 

Or even better, the read/write status?

I have a rather sticky problem with double quotes and opportunity names.

 

When a person uses a double quote, logic in a custom S-Control does not work because there is string concatenation within some java script.

 

This happens because the java script contains merge fields where are essentially plugged into the java script before that java script is sent to the client browser.

 

parent.frames.location.replace(“http://www.somenewsite.com?oppname= “ + escape(“{!Opportunity_Name}”));

 

 

If the opportunity name happens to include a double quote this function will not work. Any other invalid character will be replaced by the java script ‘escape’ function. To see why this happens look at the two following examples.

 

EXAMPLE 1

Opportunity name: Opportunity1

 

Resulting Java script after merge field applied by SFDC.

 

parent.frames.location.replace(“http://www.somenewsite.com?oppname= “ + escape(“Opportunity1”));

 

 

EXAMPLE 2

Opportunity name: Opportunity “2”

 

Resulting Java script after merge field applied by SFDC.

 

parent.frames.location.replace(“http://www.somenewsite.com?oppname= “ + escape(“Opportunity “2””));

 

 

As you can see the second example contains invalid java script syntax and will cause an error.

 

How can I encode the result coming from the SFDC merge field?

 

 

Currently I use a validation rule on the opportunity:

 

OR(CONTAINS( Name , "\""),CONTAINS( Name , "'"))

 

But I would rather allow double quotes

 

Any ideas?

I have a set of fields on a custom object.

Field1

Field2

Field3

AnotherField1

AnotherField2

FieldChangedDate

 

The fields are all number field except for the field “FieldChangeDate” which is a date and time field.

 

My question is, is there a way for me to automate updating the field “FieldChangeDate” when ever Field1, Field2 or Field3 changes?

 

I’m currently exploring work flow rules but so far I’m having no luck getting them to update that field when another field changes.

 

Thanks for any advice or tips.

I have an opportunity that I would like to undelete. I can find the data in the database using both Apex Explorer and through an APEX query if I use the ALL ROWS flag. I understand how to undelete using the apex command Undelete:

 

id OppId = '0068000000VVkwlAAD';
Opportunity opp = [select id, name from opportunity where id =: OppId ALL ROWS];

Database.UndeleteResult result = Database.Undelete(opp, false);
System.debug(result);

 

But... this record is not in the recycle bin. I get an error:

 |USER_DEBUG|[5,1]|DEBUG|Database.UndeleteResult[getErrors=(Database.Error[getFields=();getMessage=Entity is not in the recycle bin;getStatusCode=System.StatusCode.UNDELETE_FAILED;]);getId=0068000000VVkwlAAD;isSuccess=false;]

 

So the data is in the system... I just want to flip the isdeleted flag... Can I do this?

There are numerous ways to setup security in Sales Force. It seems that all the various security settings boil down to one place: Sharing. Specifically I mean the sharing button on any private object.

 

Our opportunities are private, so I see this sharing button. When I click it I get a list of those users or groups that can view or edit this opportunity. There is another button called: Expand List.

 

Using that list I can view every single user that can view the opportunity.

 

My question: How do I determine if a user can view an object? Say I have a Sales Force UserID and a Sales Force Opportunity ID.

 

Is there anyway I can plug that into something and get out a “Yes they can see this” or “No they cannot see this”

 

Or even better, the read/write status?

Hi,
I tried using the sf:listMetadata target in the ant migration tool to list all defined Reports (metadataType="Report") but I get no reports, although I have defined many of them (indeed if I use the sf:retrieve target, specifying reports, I can retrieve them).

The listMetadata works fine with other elements (e.g. CustomObject, ReportType, Profile, etc.).

Any ideas?  I also run a sf:describeMetadata and I see the Report element listed.
 
My ultimate goal is to identify selected reports based on specific internal logic without having to go through the GUI one by one.
 
Thanks
Pierpaolo 
  • October 26, 2009
  • Like
  • 0

I have a set of fields on a custom object.

Field1

Field2

Field3

AnotherField1

AnotherField2

FieldChangedDate

 

The fields are all number field except for the field “FieldChangeDate” which is a date and time field.

 

My question is, is there a way for me to automate updating the field “FieldChangeDate” when ever Field1, Field2 or Field3 changes?

 

I’m currently exploring work flow rules but so far I’m having no luck getting them to update that field when another field changes.

 

Thanks for any advice or tips.