• ksandipam1.3911488281559465E12
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 0
    Replies
Hi,

I am able to do the callouts from salesforce to Heroku. But now I want to do the secured callouts from salesfoce to Heroku using the Certificates. Can anyone help me to do the secured callouts from salesforce to Heroku

I have developed an application to integrate with Amazon S3 server. I have completed it successfully. I want to do the secure callouts from salesforce to Amazon S3 using the Self-signed and CA-Signed certificate. I have tried with the Self-Signed certificate, but I was unable to do the secure callouts. Can any one help me to do the secured callouts from Salesforce to S3.  I went through the following link " http://wiki.developerforce.com/page/Making_Authenticated_Web_Service_Callouts_Using_Two-Way_SSL ", but it is not working as expected. 

I have created same application in 2 orgs and created Self signed certificate from one org and added that certificate in S3. But still I was able to do the callouts from 2 orgs and able to get the data from 2 orgs. Can you help me to resolve this issue?
I have logged in as System Admin profile, In apex I wrote the code to
retrieve the selected record types of Account object. For example, in
account object I have 10 record types and I have selected only 5 record
types to one profile( X Profile). From the apex code, I want to retrieve
selected record types of Account object for specific profile( X Profile)

This is the code for current user profile record types. Now I want to get
the record types of specific profile. When I pass the profile Id, I want to
get the account object record types of that profile


public without sharing class SelectedRecordTypes {
public static List GetAvailableRecordTypeNamesForSObject( Schema
.SObjectType ObjType, Id profileId ) {
try {
User userId = [Select Id from User where Profile.Id =:profileId];
List names = new List();
List RecordTypes= new List();
List recTypeIds = new List ();
List infos = objType.getDescribe().getRecordTypeInfos();

// If there are 2 or more RecordTypes...
if (infos.size() > 1) {
for (RecordTypeInfo i : infos) {
if (i.isAvailable()
// Ignore the Master Record Type, whose Id always ends with
'AAA'.
// We check the Id because Name can change depending on the
user's language.
&& !String.valueOf(i.getRecordTypeId()).endsWith('AAA'))
names.add(i.getName());
}
}
// Otherwise there's just the Master record type,
// so add it in, since it MUST always be available
else names.add(infos[0].getName());
RecordTypes = [select Id, name from RecordType where Name IN :names];
for (RecordType rec : recordTypes) {
recTypeIds.add(rec.Id);
}
return RecordTypes;
} catch ( Exception recTypeException ) {
system.debug(':::::::::: recTypeException:'+recTypeException);
return null;
}
}
}

Is there any way to retrieve Selected record types of Specific profile on Specific Object?
@Httpget
global static <Apexclass> config() {
         try {

          } catch ( Exception configException ) {
               // DML operation inserting a new record
              throw new <Custom Exception>;
          }
}

When I execute it, I was able to throw the exception, but DML operation is reverting back. I want to stop the revert back operation and want to throw the exception. Is it possible ??
I have 10 active record types in an object. I have given access to 5 record types to my profile. When I query the record types of that object, then I am able to get all the active record types. But I want to receive only those assigned record types of that object. any solution from query or apex code?
I have developed an application to integrate with Amazon S3 server. I have completed it successfully. I want to do the secure callouts from salesforce to Amazon S3 using the Self-signed and CA-Signed certificate. I have tried with the Self-Signed certificate, but I was unable to do the secure callouts. Can any one help me to do the secured callouts from Salesforce to S3.  I went through the following link " http://wiki.developerforce.com/page/Making_Authenticated_Web_Service_Callouts_Using_Two-Way_SSL ", but it is not working as expected. 

I have created same application in 2 orgs and created Self signed certificate from one org and added that certificate in S3. But still I was able to do the callouts from 2 orgs and able to get the data from 2 orgs. Can you help me to resolve this issue?
I have logged in as System Admin profile, In apex I wrote the code to
retrieve the selected record types of Account object. For example, in
account object I have 10 record types and I have selected only 5 record
types to one profile( X Profile). From the apex code, I want to retrieve
selected record types of Account object for specific profile( X Profile)

This is the code for current user profile record types. Now I want to get
the record types of specific profile. When I pass the profile Id, I want to
get the account object record types of that profile


public without sharing class SelectedRecordTypes {
public static List GetAvailableRecordTypeNamesForSObject( Schema
.SObjectType ObjType, Id profileId ) {
try {
User userId = [Select Id from User where Profile.Id =:profileId];
List names = new List();
List RecordTypes= new List();
List recTypeIds = new List ();
List infos = objType.getDescribe().getRecordTypeInfos();

// If there are 2 or more RecordTypes...
if (infos.size() > 1) {
for (RecordTypeInfo i : infos) {
if (i.isAvailable()
// Ignore the Master Record Type, whose Id always ends with
'AAA'.
// We check the Id because Name can change depending on the
user's language.
&& !String.valueOf(i.getRecordTypeId()).endsWith('AAA'))
names.add(i.getName());
}
}
// Otherwise there's just the Master record type,
// so add it in, since it MUST always be available
else names.add(infos[0].getName());
RecordTypes = [select Id, name from RecordType where Name IN :names];
for (RecordType rec : recordTypes) {
recTypeIds.add(rec.Id);
}
return RecordTypes;
} catch ( Exception recTypeException ) {
system.debug(':::::::::: recTypeException:'+recTypeException);
return null;
}
}
}

Is there any way to retrieve Selected record types of Specific profile on Specific Object?