• Matt Blatnik 8
  • NEWBIE
  • 10 Points
  • Member since 2015


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 6
    Questions
  • 7
    Replies
Hi,

Can someone help me how to Mass Update Leads ( set value of field  x.  x__c = 1)



I have creasted a sobject collection variable "lstLeadFinal", followed by a flow with a
1. FAST LOOKUP where I am looking up all Lead records where x__c <> 1 and set variable  {!lstLeadUpdate}.
2. LOOP (loop through {!lstLeadUpdate} and create Loop Variable: {!loopLeadObj}
3. ASSIGNMENT ({!loopLeadObj.x__c} add {!conUpdateRecord1} [adds 1])
4. ASSIGNMENT ({!lstLeadFinal} add {!loopLeadObj}
5. FAST UPDATE as End of Loop (variable: {!lstLeadFinal})

When I run flow through process builder I get an error. 

Can someone help me how to get this to work?

Regards,

Matt
Hi,

I am new to Apex coding and have a task at work.

I need code that will generate a S2S URL for every opportunity that has a GoLiveDate.

S2S URL should be in the following format:

Below is our S2S URL (you will need to call this for the relevant product / event):
 
https://track.omguk.com/apptag.asp?APPID={UniqueID}&MID=891203&PID={PID}status=&sskey={sskey}
 
 
Parameter nameRequired value
APPIDUnique ID – for leads this can be a unique lead ID, for sales, this will be the policy number
PIDPID from the table below
SSKEYOur SSKEY – we will generate this for each click and pass over in a landing page parameter

I have created a Apex trigger:

trigger GoLiveDateChange on Opportunity (before update) {
for (Opportunity Opp : Trigger.new) {
    if ( Trigger.oldMap.get(Opp.ID).Go_Live_Date__c != Trigger.newMap.get(Opp.ID).Go_Live_Date__c );
    { SendInfo2External.GoLiveUpdate(Opp.ID);
        System.debug('Opp.ID');
     }
   }
}


But am stuck with apex class. I have came up to here:

public class SendInfo2External {
@future (callout=true)
 public static void GoLiveUpdate(id)
 {
   //Construct HTTP request and response
    //Http request method,Endpoint and setBody
    HttpRequest req = new HttpRequest();
    req.setHeader('Content-Type','application/json');
    String endpoint = 'https://track.omguk.com/apptag.asp?' + 'APPID'+ '&MID=891203&'+ 'PID={PID}status=&sskey={sskey}';
     PID pid=[select medium__c from Opportunity where id=id];
     APPID appid=[select id from Opportunity where id=id];
    }
}

Can anyone help me?

Thank you,

Matt
 
Hi,

I am trying to learn Apex.

I have created a test class in Developer org to create an account and opportunity. When I Run Test it displays success, but does not create records in Sandbox.

What could be the reason?

@IsTest(SeeAllData=true)
public class CreateTestAccOpp {
    static TestMethod void Test1(){
        Account Acc = new Account(Name = 'ABC');
    insert Acc;
        Opportunity Opp = new Opportunity (Name = 'TestDrewberry', CloseDate=system.today(),StageName = 'Qualified', AccountId = Acc.id);
    insert Opp;
}
}


 
Hi, 

I have two custom objects: Library and employees. Each employee record represents information about a user in the company. One of the fields is department.

In library i publish useful articles. 

How can I make salesforce search and assign tasks to employees to read a publisehd article when i select department "marketing" in the library object. Same field and value exists in employee object.

to sum up - when I publish an article for marketing I want each employee in markteing to get a task to read the article.
Hi,

I am a Salesforce Adminstrator with no coding skills and am kindly asking you to help me out with my project.

I have created two custom objects. 

1. Employee (holds records of all employees regardless if they are Salesforce users or not; each employee has its own record)
2. Knowledge Base (an object holding records with release articles, update articles etc.)

For each Knowledge Base record created I would like to select employees it is concerning from the multiselect picklist. Then I would like a trigger populating 2 fileds in each employee record (depending on which ones I selected in multi select picklist) to be populated.

The field names in the employees records are:
Knowledge_Base__c (Lookup(Knowledge Base)) [to be populate with value of Name standard field in Knowledge Base)
Knowledge_Base_Link__c (URL(255)) [to be populated with the URL of the Knowledge Base record]

I am happy for the fields on the Employee record to be overriden whenever a knew Knowledge Base record is submitted and same employees are selected.

I would really appreciate if someone could help me with this.

Regards,

Matt
Hi,

In the company I work for when adopting to Salesforce the management decided not to use cases and solutions. They have renamed the Solutions object and are using it for another purpouse.

After I joined the company I have realised it would be useful to start using Cases and Solutions for internal customer support. However the original Solutions object is fully customised for another purpose.

I was referred to the Developers forum by Salesforce Support. I would kindly ask someone to help me create a replica of a standard Solutions object and replicate the relationship with Cases object.

Regards,

Matt
I have a Process Builder that runs when a task is created. The idea is that it will update the WhoID. It checks the WhatID to see if it starts with a particular 3 characters that relate to a custom object.  If it does then it triggers a flow.  It sends the TaskID and the custom object ID to the flow.  The flow uses the custom object ID to find the related contact ID.  It sends me an email with the TaskID, Contact ID and Custom Object ID for troubleshooting.  Then it does a record update to update the WhoID field on the task with the Contact ID.  This works fine when the task record is created by another process.  If I create the task manually, the process fires, the flow sends me an email with all the correct IDs but the WhoID is not updated.  I added a text field on the task object and tried updaing that with the ContactID and it works in every scenario.  I have also made the launch of the flow a scheduled action so that it fires an hour after the task has been created but that does not work either.  
I have posted this in the success community and got some help there but so far the issue is not solved.  Thank you in advance for your assistance.
Hi,

Can someone help me how to Mass Update Leads ( set value of field  x.  x__c = 1)



I have creasted a sobject collection variable "lstLeadFinal", followed by a flow with a
1. FAST LOOKUP where I am looking up all Lead records where x__c <> 1 and set variable  {!lstLeadUpdate}.
2. LOOP (loop through {!lstLeadUpdate} and create Loop Variable: {!loopLeadObj}
3. ASSIGNMENT ({!loopLeadObj.x__c} add {!conUpdateRecord1} [adds 1])
4. ASSIGNMENT ({!lstLeadFinal} add {!loopLeadObj}
5. FAST UPDATE as End of Loop (variable: {!lstLeadFinal})

When I run flow through process builder I get an error. 

Can someone help me how to get this to work?

Regards,

Matt
Hi,

I am new to Apex coding and have a task at work.

I need code that will generate a S2S URL for every opportunity that has a GoLiveDate.

S2S URL should be in the following format:

Below is our S2S URL (you will need to call this for the relevant product / event):
 
https://track.omguk.com/apptag.asp?APPID={UniqueID}&MID=891203&PID={PID}status=&sskey={sskey}
 
 
Parameter nameRequired value
APPIDUnique ID – for leads this can be a unique lead ID, for sales, this will be the policy number
PIDPID from the table below
SSKEYOur SSKEY – we will generate this for each click and pass over in a landing page parameter

I have created a Apex trigger:

trigger GoLiveDateChange on Opportunity (before update) {
for (Opportunity Opp : Trigger.new) {
    if ( Trigger.oldMap.get(Opp.ID).Go_Live_Date__c != Trigger.newMap.get(Opp.ID).Go_Live_Date__c );
    { SendInfo2External.GoLiveUpdate(Opp.ID);
        System.debug('Opp.ID');
     }
   }
}


But am stuck with apex class. I have came up to here:

public class SendInfo2External {
@future (callout=true)
 public static void GoLiveUpdate(id)
 {
   //Construct HTTP request and response
    //Http request method,Endpoint and setBody
    HttpRequest req = new HttpRequest();
    req.setHeader('Content-Type','application/json');
    String endpoint = 'https://track.omguk.com/apptag.asp?' + 'APPID'+ '&MID=891203&'+ 'PID={PID}status=&sskey={sskey}';
     PID pid=[select medium__c from Opportunity where id=id];
     APPID appid=[select id from Opportunity where id=id];
    }
}

Can anyone help me?

Thank you,

Matt
 
Hi,

In the company I work for when adopting to Salesforce the management decided not to use cases and solutions. They have renamed the Solutions object and are using it for another purpouse.

After I joined the company I have realised it would be useful to start using Cases and Solutions for internal customer support. However the original Solutions object is fully customised for another purpose.

I was referred to the Developers forum by Salesforce Support. I would kindly ask someone to help me create a replica of a standard Solutions object and replicate the relationship with Cases object.

Regards,

Matt
Hi, I have a requirement like this. 
I can send the sms from my phone.I want to capture this sms into salesforce and i will create task based on sms.
With out using app exchange tools. Thanks in Advance...
I have a Process Builder that runs when a task is created. The idea is that it will update the WhoID. It checks the WhatID to see if it starts with a particular 3 characters that relate to a custom object.  If it does then it triggers a flow.  It sends the TaskID and the custom object ID to the flow.  The flow uses the custom object ID to find the related contact ID.  It sends me an email with the TaskID, Contact ID and Custom Object ID for troubleshooting.  Then it does a record update to update the WhoID field on the task with the Contact ID.  This works fine when the task record is created by another process.  If I create the task manually, the process fires, the flow sends me an email with all the correct IDs but the WhoID is not updated.  I added a text field on the task object and tried updaing that with the ContactID and it works in every scenario.  I have also made the launch of the flow a scheduled action so that it fires an hour after the task has been created but that does not work either.  
I have posted this in the success community and got some help there but so far the issue is not solved.  Thank you in advance for your assistance.