• SAURABH RASTOGI 13
  • NEWBIE
  • 5 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 13
    Replies
I have encrypted password how to decrypt using 3des algorithm? is possible encrypting/decrypting anything in Apex Code?

Any help would be greatly appreciated

Raj
Hello Developers!

I have this trigger on opportunity which allows only $500 opportunity amount per day per user. Now Trigger seem to be working fine. But however, I have a question.
Since the upcoming record's Id is not availble in Trigger.New then why is it works at line 18? Wouldn't the opp.Id is null at that line?
Trigger FiveHundred_Dollars_Opp_Amount_Limit on Opportunity(Before Insert, Before Update, After UnDelete){
     
     If(Trigger.IsInsert || Trigger.IsUpdate || Trigger.IsUnDelete){
         
         For(Opportunity opp : Trigger.New){
             
             If(Opp.Amount > 500){
                 Opp.addError('Opportunitys Amount Can not be greater than $500 per day.');
             }
             else If(Opp.Amount == null){
                 // Let it go.
             }
             
             else If(opp.Amount != null){
                 
                 List<Opportunity> FetchingCurrentUsersTodaysOpps = [Select Id, Amount
                                                                             FROM Opportunity
                                                                                 WHERE Id != :Opp.Id
                                                                                 AND   CreatedDate = Today
                                                                                 AND   Amount != null
                                                                                 AND   OwnerId =:Opp.OwnerId];
                 Double SummingAmount = Opp.Amount;
                 If(!FetchingCurrentUsersTodaysOpps.IsEmpty()){
                     
                     For(Opportunity EveryOpp : FetchingCurrentUsersTodaysOpps){
                         SummingAmount += EveryOpp.Amount;
                     }
                 If(SummingAmount > 500){
                     Opp.addError('You have reached the miximum limit of $500 opportunity Amount Per Day.');
                 }
                 }
             }
         }
     }
}

Thank You!
Hi

Im using a URL hack for a lookup field to pre-populate the value when creating new record, unfortunately value being showed in the field is "_HL_ENCODED_/_HL_   _HL__blank_HL_" expected output should be the Name of a record.

Thanks
 When ever a case has ben created it should directly create an issue  in Jira(wrote a Trigger on case object whenever a case is identified it will fire by applying some condition) now its turn to attach a file or attachment into Jira from Salesforce, myself strucked ova here.



public SalesforcetoJira(){}
//Change values in this class according to you JIRA/Salesforce coordinates
public String baseUrl = '';   // Base URL of your JIRA instance
public String username = ''; // JIRA username
public String password = ''; // JIRA password // Constructs Basic Http Authentication header from provided credentials
public String authHeader(){ Blob headerValue = Blob.valueOf(username+':'+password); return 'Basic ' + EncodingUtil.base64Encode(headerValue);
}
public SalesforcetoJira(JiraUrl,String objectType,String projectKey,String issueType,string summary,string description)
{
HttpRequest req = new HttpRequest();
Http http = new Http();
req.setMethod('GET');
//Set HTTPRequest header properties
req.setHeader('Accept', 'application/json');
req.setHeader('Content-Type','application/json');
Blob headerValue = Blob.valueOf(username+':'+password);
req.setHeader('Authorization','Basic '+ EncodingUtil.base64Encode(headerValue));
req.setEndpoint(baseUrl);
String CreateIssueJsonJIra= '{"fields": {"project":{"key": " "},"summary":" ","description":" " ,"issuetype":{"name": "Bug"}}} ';
String JSONData = JSON.serializePretty(CreateIssueJsonJIra); r
eq.setBody(CreateIssueJsonJIra);
system.debug('after response....'+CreateIssueJsonJIra);
try{
//Execute web service call here
HTTPResponse res = http.send(req);
String ResponseJsonString = res.getBody();
map<string,string> attachment= (map<string,string>)JSON.deserializeUntyped(ResponseJsonStringJIra);
system.debug('after response...'+attachment);
system.debug('after response...'+attachment.get('id'));
System.debug('ResponseJsonStringJIra'+ResponseJsonStringJIra);
JSONParser parser = JSON.createParser(ResponseJsonStringJIra);
}
}
catch(System.CalloutException e)
{
System.debug('Callout error: '+ e);
}
}


I appreciate any help.

 

Hi,

 

I am supposed to integrate salesforce with Oracle and i have no idea how this can be done, but reading through blogs i was able to figure out certain things, This is what i have thought about and i am doing presently. i am pushing in data from salesforce to SQL tables using a middleware called Apatar, this is wworking fine but later on i dont know how to get the data in Oracle application does any one know this who can help me out? or writing API's is only the method can any one help me out.  Any freelancer or on paid basis:

 

This is what is supposed to go into Oracle when the order is closed:

The following data should be pushed in from Salesforce to Oracle:

 

When the user changes an opportunity to “Order Won” the following details should be pushed in a sequential manner from Salesforce to Oracle:

1)      The Oracle system should check if the particular customer is present in Oracle or else create a new customer.

2)      The Oracle system should check if the particular contact is present in Oracle or else create a new one.

3)      The Quote/Opportunity details from salesforce (Information required in Oracle to process the Sales Order). Example: Branch, SalesOrder Number, Segment, Customer Profile, P.O Number Etc.

4)      The related line items (Products) with their respective basic price and tax structure.

5)      Post sending if there are any changes in the related Quote/Line Item then the same should be appended in Oracle system

 

Oracle To Salesforce:

Once the order is processed then the invoice number and date should be pushed from Oracle to salesforce.



 

Appreciate your help.