• Tikam.Sangwani
  • NEWBIE
  • 95 Points
  • Member since 2018

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies
How to achive rollupsummary by using of agregate functions?(lookup relation between custom object)
obj1 - count__c(custom field) - will calculate the total amount__c
obj2 - having lookup to obj1 - amount__c (available in obj2)

How can I achive this by aggregate functions?
  • January 11, 2019
  • Like
  • 0
Hello,

I want to add a value to the "source" field of "lead" oject, and pass it through the chage set.

Is it possible to do bychange set ?

Thank you in advance
  • January 09, 2019
  • Like
  • 0
Can somebody help me over here,I am getting error and I am not able to create a record using rest api from one salesforce org to other.

Here is my code,

public void getConList()
{

list<account> accList1=new list<account>();
String accToken;
string responseBody;
string endPoint='https://ap5.salesforce.com/services/apexrest/getAccountOnExternalId';
restApiClassSalesforceorg1 obj=new restApiClassSalesforceorg1();
accToken=obj.getRequestToken();
system.debug('access token'+ accToken);
if(accToken!='')
{
String accName1='Test from org 1 to org 2';
string Jsonstring='{"Name":"Acc from org 1"}';
Http h1=new Http();
HttpRequest req1=new HttpRequest();
req1.setHeader('Authorization','Bearer '+accToken);
req1.setHeader('Content-Type','application/json');
//req1.setHeader('accept','application/json');
req1.setMethod('POST');
req1.setBody(Jsonstring);
req1.setEndpoint(endPoint);
HttpResponse hresp1=h1.send(req1);
system.debug('hresp1'+ hresp1);
//listWrap=(list<resultWrapper>) JSON.deserialize(hresp1.getBody(),list<resultWrapper>.class);

}

// return listWrap;

}





@RestResource(urlMapping='/getAccountOnExternalId/*')
   global with sharing class getAccount {
     @HttpPost
      global Static string fetchAccount(string name1){
      Account obj=new account();
      obj.name=name1;
      Insert obj;
        
        return 'Success';
      }
   }
How to achive rollupsummary by using of agregate functions?(lookup relation between custom object)
obj1 - count__c(custom field) - will calculate the total amount__c
obj2 - having lookup to obj1 - amount__c (available in obj2)

How can I achive this by aggregate functions?
  • January 11, 2019
  • Like
  • 0
Hello,

I have a lookup on the "opportunity" to the "contact".
Once the user clicks on this lookup, tit should only show all the contact which are XYZ. Xyz is a field that is checked on contact.

Thank you for suggestion
  • January 09, 2019
  • Like
  • 0
Hello,

I want to add a value to the "source" field of "lead" oject, and pass it through the chage set.

Is it possible to do bychange set ?

Thank you in advance
  • January 09, 2019
  • Like
  • 0
Can somebody help me over here,I am getting error and I am not able to create a record using rest api from one salesforce org to other.

Here is my code,

public void getConList()
{

list<account> accList1=new list<account>();
String accToken;
string responseBody;
string endPoint='https://ap5.salesforce.com/services/apexrest/getAccountOnExternalId';
restApiClassSalesforceorg1 obj=new restApiClassSalesforceorg1();
accToken=obj.getRequestToken();
system.debug('access token'+ accToken);
if(accToken!='')
{
String accName1='Test from org 1 to org 2';
string Jsonstring='{"Name":"Acc from org 1"}';
Http h1=new Http();
HttpRequest req1=new HttpRequest();
req1.setHeader('Authorization','Bearer '+accToken);
req1.setHeader('Content-Type','application/json');
//req1.setHeader('accept','application/json');
req1.setMethod('POST');
req1.setBody(Jsonstring);
req1.setEndpoint(endPoint);
HttpResponse hresp1=h1.send(req1);
system.debug('hresp1'+ hresp1);
//listWrap=(list<resultWrapper>) JSON.deserialize(hresp1.getBody(),list<resultWrapper>.class);

}

// return listWrap;

}





@RestResource(urlMapping='/getAccountOnExternalId/*')
   global with sharing class getAccount {
     @HttpPost
      global Static string fetchAccount(string name1){
      Account obj=new account();
      obj.name=name1;
      Insert obj;
        
        return 'Success';
      }
   }
Hi All,
I'm trying to complete the steps in the track field service unit. Unfortunately when I try to adjust the Service Report Template I cannot save the changes, as I receive a Insufficient Privileges error message as System Administrator. The Org is newly created for the Field Service Trailheads.
Is there anything specific which needs to be taken into account for the Service Report Templates.
Thanks,
Nadine