• Biswa Ray
  • NEWBIE
  • 30 Points
  • Member since 2015
  • Technical Lead,Architect
  • Cognizant Techonology Solutions


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies
Hi Everyone,
I have followed the procedure to access the rest api by registering app in  https://apps.dev.microsoft.com . But when i'm making a callout for oauth authorize using the following url 
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?response_type=code&client_id=32613fc5-e7ac-4894-ac94-fbc39c9f3e4a&redirect_uri=https:%2f%2foauthplay.azurewebsites.net%2f&scope=openid+offline_access+profile+https:%2f%2foutlook.office.com%2fmail.readwrite+https:%2f%2foutlook.office.com%2fmail.readwrite.shared+https:%2f%2foutlook.office.com%2fmail.send+https:%2f%2foutlook.office.com%2fmail.send.shared+https:%2f%2foutlook.office.com%2fcalendars.readwrite+https:%2f%2foutlook.office.com%2fcalendars.readwrite.shared+https:%2f%2foutlook.office.com%2fcontacts.readwrite+https:%2f%2foutlook.office.com%2ftasks.readwrite

I'm getting status code as 200 instead of 302.Also at further notice , response.getBody() is returning html rather json , also the same get method code work's if i used in browser.
Http http1 = new Http();
        HttpRequest request1 = new HttpRequest();
request1.setEndpoint('https://login.microsoftonline.com/common/oauth2/v2.0/authorize?response_type=code&client_id=32613fc5-e7ac-4894-ac94-fbc39c9f3e4a&redirect_uri=https:%2f%2foauthplay.azurewebsites.net%2f&scope=openid+offline_access+profile+https:%2f%2foutlook.office.com%2fmail.readwrite+https:%2f%2foutlook.office.com%2fmail.readwrite.shared+https:%2f%2foutlook.office.com%2fmail.send+https:%2f%2foutlook.office.com%2fmail.send.shared+https:%2f%2foutlook.office.com%2fcalendars.readwrite+https:%2f%2foutlook.office.com%2fcalendars.readwrite.shared+https:%2f%2foutlook.office.com%2fcontacts.readwrite+https:%2f%2foutlook.office.com%2ftasks.readwrite');
  request1.setMethod('GET');
  HttpResponse response = http1.send(request1);

        System.debug('****'+response.getBody()   );
        System.debug('****  '+response.getStatusCode() );

Please help me with links and solutions
Thanks and Regards,
Shiva RV

 
User-added image
I have a pick list called System Size(System_Size_SUB_2013__c). When I select 2000L SUB from pick list, I want to give an alert to the user. (Only for a 2000L SUB, Not all of them). Any idea how to do that? Thanks

Field
<apex:inputField value="{!Product_Brief__c.System_Size_SUB_2013__c}" required="true"/>

 
I have a report that uses the contact record and I want to add the User object field "Last Login" to this report.

I believe I can do this with a trigger. Please let me know if I am on the right track. I should create a custom field on the contact object and use a trigger to populate the Last Login info into that custom field? Can you please help me write this code?

Thanks

Hello all,
I work in a 10-people company, I did a small Lightining app in order to make our everyday Salesforce life better. I developed it in the sandbox, an it works just fine. Now I would like to load it in the production environment (Salesforce).
Components:

Lightning app ==> BASED ON ==> Visualforce Page ==> CALLING A ==> Custom controller (Apex Class) ==> UPDATING A ==> New account field

No problem creating the new account field in PROD environment, but apparently I "Can not create Apex Class on an active organization." Is it possible to overcome this? I would like to avoid long procedures..

Thanks in advance for sharing your knowledge on this one.

Cheers,

Andreas

I'm working on Trailhead Challenge to Create a flow to streamline entry of new accounts, contacts, and opportunities.

I've got a screen with:
  • First Name
  • Last Name
  • Company Name
  • Opportunity Amount
  • Opportunity Stage

Then Record Create to Create Account:
  • Name = Company Name
  • Variable AccountId

Then Record Create to Create Contact:
  • FirstName = First Name
  • LastName = Last Name
  • AccountId = AccountID

Then Record Create to Create Opp:
  • Name = Company Name (Can i use formula for Company_Name + "-" + Last_Name?)
  • CloseDate = Flow.CurrentDate (can I use Flow.CurrentDate + 30?)
  • AccountId = AccountID
  • StageName = Prospecting
  • Amount = Opportunity_Amount

The flow saves. But when I run it and enter info, I get error:
"An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information."


At first, I thought it was because my formula weren't working to concatanate company name and last name, or to add 30 days to date for close date. But even when I remove the formulas and just use the screen fields, I get the same error.

What am I doing wrong?