• Saugandh K
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 5
    Replies
Hi need help mates.

Here is the scenario.
The external web API process is pushing the set of 'contact' details to salesforce and I have to map it to the salesforce records. Here the incoming data contains a field called "employeeId" in each of the contact list. By using this field we have to identify if the incoming contact has to be INSERTED or UPDATED. I.e. if employee id exists, update the salesforce records with the updated values for that particular contact, else insert.

Till now I have done is sending one contact  using postman and have done the insert/update proceedure. Now I have to deal with thousands of contacts in a list to do this.

Doubt 1: 
How can I categorise the contacts that have to be inserted or updated ?

Doubt 2:
Should I use an apex class or trigger for this?
Hi,
The certificate expiry emails are currently forwaded to all admins. How to send this kind of admin specific system generated emails to OWD email address or non-admins ? OWD email address is my priority!
 
The current situation is like this:
When i click on the radiobutton it passes the corresponding accountId to the following function.
doUpdate: function(component,event){
        var action = component.get("c.doUpdate");
        action.setParams({req : 'test'});
        action.setCallback(this, function(response){ 
            var selectedRows = event.getParam('selectedRow');
            var navigateEvent = $A.get("e.force:editRecord");
            navigateEvent.setParams({ "recordId": selectedRow[0].Id  });
            navigateEvent.fire();
        });
         $A.enqueueAction(action);
    }

The code in the setCallback lets me popup the account edit screen successfully. The problem is that the popup loads the default recordtype layout. I am expecting the custom Lightning component to be loaded in the popup ( I could override the editbutton on customer page, but how to mimic this edit button click in code?).
 
I am working on case screen where i have various recordtypes.
For a particular recordtype, i have overriden the case edit page using visualforce. Here the 'Save' button functionality is working properly and it redirects to the case detail page. But I am unable to do the 'CloseCase' button operation. i.e when i click on 'CloseCase' it should redirect to the case close page.
User-added image
I am using a workflow to trigger an email alert. The main recepient contains actual email addresses and in the additional 5 email space contains email address realted to sms services. See the screenshot below.
User-added image

This functionality was working till last week. Now that the emails in the additional field is not working as SMS is not reaching the cell phone. The email in the recepient field is working perfectly fine.
Also i have checked sending mail to xxxxxxx888.vtext.com via my outlook ,and the SMS reached the phone. SMS is not generated only when it is sent via salesforce. Please see my deliveribility settings below:

User-added image

Also i have generated Email Logs:
User-added image

Please guide me to findout the problem.
 
When I give 'Run all test' while deploying the following error occurs. 
User-added image
There is an App 'Multi-Select Picklist Frequency Reports'  which is the only related thing I could understand from the error.
User-added image

User-added image
This appeared suddenly and I believe I have not worked on any of the following classes. Please guide me to find out the root cause and to solve it.
I am using a trigger to save 'Points' to an external database thorugh API callout. The result got from this API response should be updated to the salesforce databse though a DML operationThis callout and following DML operation is a part of CASE closing.
In the trigger i have a function as following:
 
public void processAfterUpdate()
{
     awardPoints( id, true)
}


@future(callout=true)
public static void awardPoints(Id caseId,Boolean isMYCard)
    {
      ----------
      ----------
        POperations pOps = new POperations();
            if(isMYCard)
                 res = pOps.processPoints(reqBody,true);
            else
                 res = pOps.processPoints(reqBody,false);
            
            if(res != null)
            {
             --------
             --------
                    Database.SaveResult sr = Database.update(c);
            }
        }

Here processPoints is a function in a controller class elseware. Below is the processPoints function used :
public HttpResponse processPoints(String reqBody,Boolean isMyCard)
	{
	Http h = new Http();
        HttpRequest req = new HttpRequest();
        HttpResponse res;

        if(isMyCard)
	    	req.setEndpoint(BASE_URL+'/api/xxxx/xxxxx');
        else
            req.setEndpoint(BASE_URL+'/api/yyyy/yyyyy');
            
	    req.setMethod('POST');
	    req.setHeader('Content-Type','application/json;charset=UTF-8');
	    req.setHeader('Accept', 'application/json');
	    req.setBody(reqBody);
            req.setTimeout(TIMEOUT_MILLISECS);
	    req.setClientCertificateName(CLIENT_CERTIFICATE);
	    try
           {
               res = h.send(req);
           }
           catch(Exception e)
           {
             System.debug('Exception====='+e);
           }
           return res;
	}

This always gives an error "You have uncommitted work pending. Please commit or rollback before calling out". 
Im a newbie in triggers an callouts. Please guide me.
 
I am using a trigger to save 'Points' to an external database thorugh API callout. The result got from this API response should be updated to the salesforce databse though a DML operationThis callout and following DML operation is a part of CASE closing.
In the trigger i have a function as following:
 
public void processAfterUpdate()
{
     awardPoints( id, true)
}


@future(callout=true)
public static void awardPoints(Id caseId,Boolean isMYCard)
    {
      ----------
      ----------
        POperations pOps = new POperations();
            if(isMYCard)
                 res = pOps.processPoints(reqBody,true);
            else
                 res = pOps.processPoints(reqBody,false);
            
            if(res != null)
            {
             --------
             --------
                    Database.SaveResult sr = Database.update(c);
            }
        }

Here processPoints is a function in a controller class elseware. Below is the processPoints function used :
public HttpResponse processPoints(String reqBody,Boolean isMyCard)
	{
	Http h = new Http();
        HttpRequest req = new HttpRequest();
        HttpResponse res;

        if(isMyCard)
	    	req.setEndpoint(BASE_URL+'/api/xxxx/xxxxx');
        else
            req.setEndpoint(BASE_URL+'/api/yyyy/yyyyy');
            
	    req.setMethod('POST');
	    req.setHeader('Content-Type','application/json;charset=UTF-8');
	    req.setHeader('Accept', 'application/json');
	    req.setBody(reqBody);
            req.setTimeout(TIMEOUT_MILLISECS);
	    req.setClientCertificateName(CLIENT_CERTIFICATE);
	    try
           {
               res = h.send(req);
           }
           catch(Exception e)
           {
             System.debug('Exception====='+e);
           }
           return res;
	}

This always gives an error "You have uncommitted work pending. Please commit or rollback before calling out". 
Im a newbie in triggers an callouts. Please guide me.
 
Hi need help mates.

Here is the scenario.
The external web API process is pushing the set of 'contact' details to salesforce and I have to map it to the salesforce records. Here the incoming data contains a field called "employeeId" in each of the contact list. By using this field we have to identify if the incoming contact has to be INSERTED or UPDATED. I.e. if employee id exists, update the salesforce records with the updated values for that particular contact, else insert.

Till now I have done is sending one contact  using postman and have done the insert/update proceedure. Now I have to deal with thousands of contacts in a list to do this.

Doubt 1: 
How can I categorise the contacts that have to be inserted or updated ?

Doubt 2:
Should I use an apex class or trigger for this?
The current situation is like this:
When i click on the radiobutton it passes the corresponding accountId to the following function.
doUpdate: function(component,event){
        var action = component.get("c.doUpdate");
        action.setParams({req : 'test'});
        action.setCallback(this, function(response){ 
            var selectedRows = event.getParam('selectedRow');
            var navigateEvent = $A.get("e.force:editRecord");
            navigateEvent.setParams({ "recordId": selectedRow[0].Id  });
            navigateEvent.fire();
        });
         $A.enqueueAction(action);
    }

The code in the setCallback lets me popup the account edit screen successfully. The problem is that the popup loads the default recordtype layout. I am expecting the custom Lightning component to be loaded in the popup ( I could override the editbutton on customer page, but how to mimic this edit button click in code?).
 
I am working on case screen where i have various recordtypes.
For a particular recordtype, i have overriden the case edit page using visualforce. Here the 'Save' button functionality is working properly and it redirects to the case detail page. But I am unable to do the 'CloseCase' button operation. i.e when i click on 'CloseCase' it should redirect to the case close page.
User-added image
I am using a workflow to trigger an email alert. The main recepient contains actual email addresses and in the additional 5 email space contains email address realted to sms services. See the screenshot below.
User-added image

This functionality was working till last week. Now that the emails in the additional field is not working as SMS is not reaching the cell phone. The email in the recepient field is working perfectly fine.
Also i have checked sending mail to xxxxxxx888.vtext.com via my outlook ,and the SMS reached the phone. SMS is not generated only when it is sent via salesforce. Please see my deliveribility settings below:

User-added image

Also i have generated Email Logs:
User-added image

Please guide me to findout the problem.
 
Hi Everyone,

i am having an issue where the edit button has been overridden by custom lightning component and there we are using force:recordEdit to load the standard edit layout. As I am passing the record id, when user clicks on change record type -> it shows modal for record type selection and then after selection it navigates to custom edit lightning component and loads the record with old record type. I am getting the new recordtype id in URL but its not updating the force:recordEdit loaded record with newly selected record type.

Thanks,
Sanjay Kumar