• richfer_
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies
I've to make a call to a external REST api from the apex code. Here is the api,

curl https://website.com/v1/customer/searchbyid/<customer_id> -H 'Content-Type: application/json' -H 'Authorization: APIKey'

I would like to call the api and access the returned values in my controller. 

I'm retrieving the value of a standard object and diaplaying in the Site. When I try to update the value or try creating a new record it requires a user to log in. I want to update or insert a record without logging in. Is ti possible for me to achieve it?
Having added a custom field(Group_ Tasked __c) to the case object in clients org, they have the values  being added to that field also for the cases created.

And I’m working on a different developer org, that’s with a customized app for the client. I’ve a data table that shows the cases with the desired fields that should’ve the custom field(Group_Tasked__c) in it. When I’m getting a managed package with my developer org, the field has namespace added to the beginning. When it’s being installed to the clients org, it behaves as a different field that the cases have both the fields as “W_F__Group_ Tasked __c” and “Group_ Tasked __c”.

Is there a way for me to have a custom field added in my developer org and that can have the values in the clients org’s custom field when the package is installed?

How to write test method for the following web service method?

 

 public String resetPassword(Long contactId,String userName,String passWord,Integer updatedBy) {
            serviceFlorenceWeaComNew.resetPassword request_x = new serviceFlorenceWeaComNew.resetPassword();
            serviceFlorenceWeaComNew.resetPasswordResponse response_x;
            request_x.contactId = contactId;
            request_x.userName = userName;
            request_x.passWord = passWord;
            request_x.updatedBy = updatedBy;
            Map<String, serviceFlorenceWeaComNew.resetPasswordResponse> response_map_x = new Map<String, serviceFlorenceWeaComNew.resetPasswordResponse>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              ...
            );
            response_x = response_map_x.get('response_x');
            return response_x.return_x;
        }

Having added a custom field(Group_ Tasked __c) to the case object in clients org, they have the values  being added to that field also for the cases created.

And I’m working on a different developer org, that’s with a customized app for the client. I’ve a data table that shows the cases with the desired fields that should’ve the custom field(Group_Tasked__c) in it. When I’m getting a managed package with my developer org, the field has namespace added to the beginning. When it’s being installed to the clients org, it behaves as a different field that the cases have both the fields as “W_F__Group_ Tasked __c” and “Group_ Tasked __c”.

Is there a way for me to have a custom field added in my developer org and that can have the values in the clients org’s custom field when the package is installed?

I'm retrieving the value of a standard object and diaplaying in the Site. When I try to update the value or try creating a new record it requires a user to log in. I want to update or insert a record without logging in. Is ti possible for me to achieve it?
trigger UpdateAmount1 on Quote__c (after insert, after update) {
List<Opportunity> parentObjList = new List<Opportunity>();
List<Id> listIds = new List<Id>();
List<Quote__c> newQuotes = new Quote[]{};

for (Quote__c childObj : Trigger.new) {
    listIds.add(childObj.Qpp__c);
newQuotes.put(childObj.Qpp__c, Quote__c);
}

parentObjList = [SELECT id,Name FROM Opportunity WHERE ID IN :listIds];

for (Opportunity opp : parentObjList){
    opp.Amount = newQuotes.get(opp.Id).Total_List_Price__c;
}

update parentObjectList;
}