• asgirisoft
  • NEWBIE
  • 0 Points
  • Member since 2008

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

Hello,

 

A client of ours wants to share Opportunities and an underlying custom object to PRM users (channel partners). They have PRM users belonging to 10 channel partners who would be using the system. Data privacy should be maintained between the partners. Should we recommend them to change ownership of relevant records to the appropriate Parter user? We can set "Read all Data" on all internal users so that all CRM users have pervasive Read access to those records. Is this the best practice?

 

Is there a smarter way to handle this without manually changing record ownership. Perhaps we can use Role configuration to plug the "Partner Executive A" role as a sub-ordinate to the corresponding "Channel Partner A" role. Please send me your expert ideas.

 

Andi Giri

Softsquare

Hello,

 

I have a future callout from a time-based trigger. This callout in turn calls a Visualforce page.

On the trigger, UserInfo.getSessionId() returns null, hence the page does not get invoked; the Http callout hits the Salesforce.com login page.

Please suggest a way to obtain the sessionid on a Apex trigger invoked by a Time based workflow.

 

What is the validity time for a SFDC sessionid?
 

Andi Giri
Softsquare
www.softsquare.biz

Hello,

 

I have a future callout from a time-based trigger. This callout in turn calls a Visualforce page.

On the trigger, UserInfo.getSessionId() returns null, hence the page does not get invoked; the Http callout hits the Salesforce.com login page. Please suggest a way to obtain the sessionid on a Apex trigger invoked by a Time based workflow?

 

What is the validity time for a SFDC sessionid?

 

Andi Giri

Softsquare

www.softsquare.biz

Doug,

I am developing a Visualforce page that would need to access the EMAILSTATUS object and related Contact objects and display them in a report format. This is currently available as the "HTML Email Status report". I could not modify that. Neither does SF expose this object for reporting purposes.
It is available only via the Ajax API.
How would I get a VF controller to access this object and print all the join records between EMAILSTATUS and Contact objects?

Andi Giri

Hi all,

   This one puzzles me..plain and simple, the code works but I'm getting null for UserInfo.getSessionId(). Someone tell me why?! :robotmad: Thanks. 

public class AccountUpdater {

//Future annotation to mark the method as async.
@Future(callout=true)
public static void updateAccount(String id, String name) {

//construct an HTTP request
HttpRequest req = new HttpRequest();
User currentUser = [select ServerURL__c from User where id = :UserInfo.getUserId()];
req.setEndpoint('https://example.com/dbaccess/connect.php?sessionid=' + UserInfo.getSessionId() +
'&serverurl=' + currentUser.ServerURL__c + '&module=test&id=' + id);
req.setMethod('GET');

//send the request
Http http = new Http();
HttpResponse res = http.send(req);

//check the response
if (res.getStatusCode() == 200) {
//update account
Account acc = new Account(Id=id);
acc.Description = res.getBody();
update acc;
} else {
System.debug('Callout failed: ' + res);
}
}
}

 

 

Hi,

 

I've seen that the topic of sites authentication has been discussed at some length in another thread in this forum.  Can someone confirm for me, however, that if I wanted to implement authentication aside from customer portal, I'd have to roll it more or less (or completely?) from scratch myself?

 

If so, are there any 3rd party libraries/AppExchange apps/Apex classes that facilitate that?  For example, session management (for sites), password hashing, checking for authentication bypass, etc...

 

Any insights are most welcome...

 

Thanks  in advance,

 

Alex

 

Is there a way to invoke Apex Class Web Service from workflow message action (SOAP)?

We built a simple APEX class and we would like to call that class from workflow message action passing URL Endpoint and Sessiond ID.
We receive this error from the message queue: "INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session"

Apex class is very simple for testing purpose:

global class HelloWorld2 {
 WebService static void sayHelloWorld(String arg)
{
Lead lead;
lead = new Lead();
lead.firstname = 'Name name';
lead.lastname = 'Surname';

insert lead;
}

}

Endpoint for workflow message action setup is:
https://na4-api.salesforce.com/services/Soap/class/HelloWorld2

Any help about that?

Folks,

Anyone know why I would be getting an Invalid Session error when I try to call a javascript function from an onclick event in the my Visualforce page.  The javascript function has a data call using the sforce.connection.query syntax.  Everytime I test fire my onclick event, I get a popup error on my VF page stating that the Invalid session...Illegal session and some other text....

Any help is greatly appreciated...

Thanks
At Dreamforce, I thought I saw an example in which a SOQL dataset was instantiated directly from within the value="..." element of an apex: container such as apex:dataTable, ie

Code:
<apex:pageBlockList var="myItem" value="!{[Select ID, Name From...]}">

but now that I'm searching for it I can't find anything like this. Is it possible? Is there some functionality like it that I may be confusing it with?

Thanks,
Lindsay