• AlteryxMike
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies

I am involved in a project where I need to pull certain data from the Salesforce objects.

I have found everything I need in the Opportunity object other than the Quotas that the sales people enter into their "Personal Information" area.

 

I see those quota values in the RevenueForecast object.

Is this the correct place for me to pick up these values, or is there a better place?

 

Since users enter their quotas into their personal information page, I expected this data to be referenced either from User or Profile. While RevenueForecast does have a reference to the User object, for some reason it doesn't seem like the right spot to get this information.

 

So, just curious if anyone knows the best place to find this info.

 


Thanks,

Michael Bryan

I am new to force.com and apex and am coding up a batch class to copy records from the Opportunity object into a custom object.

Everything is working well except I can't figure out how to access fields in a relationship to Opportunity such as Account.Name.

 

For example, I am using a query such as this in my batch class start method:

 

    global Database.QueryLocator start(Database.BatchableContext BC){
        return Database.getQueryLocator('SELECT o.Amount, o.Account.Name from Opportunity o');
    }

 

Then in my execute method, I am accessing the values like this:

 

    global void execute(Database.BatchableContext BC, list<sObject> scope){
        List<OpportunityTrend__c> opps = new List<OpportunityTrend__c>();

        for (sObject s : scope) {

            OpportunityTrend__c OpTrend = new OpportunityTrend__c();

            OpTrend.Amount__c = (Decimal)s.get('Amount');

            opps.add(OpTrend);

        }

        insert opps;

    }

 

Where I need help is in the syntax to get at the o.Account.Name field string value.

I've tried this, but it doesn't work:

 

        OpTrend.AccountName__c = (String)s.get('Account.Name');

 

I'm not sure if my problem is in my s.get() call (wrong syntax, wrong method, etc) or if it's in my initial SOQL query.

 

 

Any help would be greatly appreciated.

BTW, I have looked at this thread: SOQL-Getting-Opportunity-AccountName-in-one-query which appears to be very similar to the question I have, but does not provide the level of detail I need.

 

Thanks!!

 

-mike

 

We are using AD FS 2.0 and SAML 2 to implement SSO into Salesforce.com


We have IdP-initiated SSO working but having trouble with the SP-Initiated SSO.
When I follow a deep link in Salesforce (while not logged in), it does redirect back to our ADFS for authentication, but then it just sits there and does not redirect back to Salesforce. I'm not getting a lot of useful information in the ADFS logs and tracing so I'm not sure where to go from here.

We end up at this page - which in our case is blank (possibly part of the problem)
         https://<server-name-here>/adfs/ls

We do not have the "My Domain" setup, so I'm not sure if that's what's missing. Seems to me the problem is in ADFS since Salesforce is sending a request back to ADFS, but then ADFS is not redirecting back to Salesforce.

Any help would be greatly appreciated. Thanks!

-mike

I am involved in a project where I need to pull certain data from the Salesforce objects.

I have found everything I need in the Opportunity object other than the Quotas that the sales people enter into their "Personal Information" area.

 

I see those quota values in the RevenueForecast object.

Is this the correct place for me to pick up these values, or is there a better place?

 

Since users enter their quotas into their personal information page, I expected this data to be referenced either from User or Profile. While RevenueForecast does have a reference to the User object, for some reason it doesn't seem like the right spot to get this information.

 

So, just curious if anyone knows the best place to find this info.

 


Thanks,

Michael Bryan

I am new to force.com and apex and am coding up a batch class to copy records from the Opportunity object into a custom object.

Everything is working well except I can't figure out how to access fields in a relationship to Opportunity such as Account.Name.

 

For example, I am using a query such as this in my batch class start method:

 

    global Database.QueryLocator start(Database.BatchableContext BC){
        return Database.getQueryLocator('SELECT o.Amount, o.Account.Name from Opportunity o');
    }

 

Then in my execute method, I am accessing the values like this:

 

    global void execute(Database.BatchableContext BC, list<sObject> scope){
        List<OpportunityTrend__c> opps = new List<OpportunityTrend__c>();

        for (sObject s : scope) {

            OpportunityTrend__c OpTrend = new OpportunityTrend__c();

            OpTrend.Amount__c = (Decimal)s.get('Amount');

            opps.add(OpTrend);

        }

        insert opps;

    }

 

Where I need help is in the syntax to get at the o.Account.Name field string value.

I've tried this, but it doesn't work:

 

        OpTrend.AccountName__c = (String)s.get('Account.Name');

 

I'm not sure if my problem is in my s.get() call (wrong syntax, wrong method, etc) or if it's in my initial SOQL query.

 

 

Any help would be greatly appreciated.

BTW, I have looked at this thread: SOQL-Getting-Opportunity-AccountName-in-one-query which appears to be very similar to the question I have, but does not provide the level of detail I need.

 

Thanks!!

 

-mike