• Haroon Ahmad
  • NEWBIE
  • 25 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 6
    Replies

Hi,

My goal is simple.

 

For an Opportunity, when an approval request is submitted, caculate the URL for the Approval page, and store it in a custom Field in the Opportunity object. One of the steps in the approval submission is upating a field in the Oppty object. So, the approval submission is firing a Opportunity trigger.

 

What I'm trying to do is to capture the URL of Approval page of thye Oppty, in the After or Before update of the trigger. To do this I use the followihng query:

 

List<ProcessInstanceWorkitem> piWorkItems = [SELECT Id, processinstance.targetobjectid  FROM ProcessInstanceWorkitem where processinstance.targetobjectid in :opptyIdList];
    	

 But this query does not give me any results in either the before or the after update triggers for the Oppty.

 

But if I run this query after the record has been saved, then I do get a valid ProcessInstanceWorkitem record for this opportunity.

 

Looks like during the whole approval process (including the workflow and trigger fired), the ProcessInstanceWorkitem is not available to be read at all. (maybe because it is a system Object?)

 

Would appreciate confirmation/similar experiences.

 

Thanks!

 

-Haroon

Hi,

Looking for best practices for team developement.

 

Found this resource:

 

http://wiki.developerforce.com/page/Using_Force.com_with_Subversion_for_Team_Development

 

If there're any other resources/best practices around team develoepment across the whole life cycle, would appreciate if somebody can share.

 

Thanks!

 

-Haroon

We're running into a performance issue that we would appreciate guidance on:
 
We need to a like query on the Name field in the Account object, something like:
 
[select name from account where name like '%bendoug%' or name like '%gustavo%' or name like '%Ben%' or name like '%wyeth%']
 
This query is taking very long time to process.
 
The business requirement is matching against the account name.
 
Has anybody run into this issue, and solved it?
 
Thanks.
 
-Haroon

Hi,

The moment an Approval Request is submitted, I was to capture the Approval Step link, and store it in a custom object.

 

For this reason, I'd like to have a trigger on the ProcessInstanceWorkitem object.

 

But this does not show up in the list of objects against which I can create a Trigger.

 

Is it possible/allowed by the Force.com platform, to create a trigger on the ProcessInstanceWorkitem object?

 

Regards

 

-Haroon

Hi,

In a worflow, can /i set the field update to set a field value to anoither field value. 

 

The field type is User(lookup).

 

Right now I'm being foirced to choose a specific user, but like to just set the value of this field to another field in the same object.

 

Thanks!

 

-Haroon

Hi,

 
I need to write some records from a Google spreadsheet to Salesforce.
 
The approach I'm taking is restful API and Google Apps Script.  So I plan to expose the methods on the Salesforce side.
 
The Google App script will call the restful  method on salesforce, which will take some parameters from the Google App Script.
 
My main doubt is around authentication from Google App Script to Salesforce.
 
I've read about oAuth as a way to authenticate. Is that the best way to do that? Are there some other easier options?
 
I'm trying to figure out the best way to connect to (oAuth vs Session ID).
 
Thanks a lot for your help!
 
-Haroon
We're running into a performance issue that we would appreciate guidance on:
 
We need to a like query on the Name field in the Account object, something like:
 
[select name from account where name like '%bendoug%' or name like '%gustavo%' or name like '%Ben%' or name like '%wyeth%']
 
This query is taking very long time to process.
 
The business requirement is matching against the account name.
 
Has anybody run into this issue, and solved it?
 
Thanks.
 
-Haroon

Hi,

The moment an Approval Request is submitted, I was to capture the Approval Step link, and store it in a custom object.

 

For this reason, I'd like to have a trigger on the ProcessInstanceWorkitem object.

 

But this does not show up in the list of objects against which I can create a Trigger.

 

Is it possible/allowed by the Force.com platform, to create a trigger on the ProcessInstanceWorkitem object?

 

Regards

 

-Haroon

Hi,

In a worflow, can /i set the field update to set a field value to anoither field value. 

 

The field type is User(lookup).

 

Right now I'm being foirced to choose a specific user, but like to just set the value of this field to another field in the same object.

 

Thanks!

 

-Haroon

Hi,

 
I need to write some records from a Google spreadsheet to Salesforce.
 
The approach I'm taking is restful API and Google Apps Script.  So I plan to expose the methods on the Salesforce side.
 
The Google App script will call the restful  method on salesforce, which will take some parameters from the Google App Script.
 
My main doubt is around authentication from Google App Script to Salesforce.
 
I've read about oAuth as a way to authenticate. Is that the best way to do that? Are there some other easier options?
 
I'm trying to figure out the best way to connect to (oAuth vs Session ID).
 
Thanks a lot for your help!
 
-Haroon