• RupB
  • NEWBIE
  • 25 Points
  • Member since 2009

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 14
    Replies

Hi,

We are Customer Service professionals, SF partners and developers. I would like your feedback about best practices around the following subject :

 

UseCase :

We have Cases, and Order Requests for spare parts to be sent to field technicians for maintenance.

Every evening, these Order Requestsare input manually into the ERP.

2-3 times per day, the ERP sends to Salesforce (we use Data Loader) the status of each Order and, when delivered, each Order Delivery (== Asset).

Orders have a master-detail relationship to order Lines, just like Opportunity and OpportunityLineItem. Orders are related to 1 and 1 only Case.

In the ERP, Orders are created for a given Case; CaseNumber is input in an attribute of the Order. The interface from ERP to Salesforce looks forthe CaseNumber as uniques external id to associate the Order to the right case. Sometimes, Case Numbers are badly input into the ERP, and the interface will not be able to find the right Case.

We also do roll-up of amounts ($) from OrderLine to Order, and from Order to Case.

 

Question :

In our implementation, we did not create a Master-Detail relation between Case and Order, so we cannot do roll-ups with the standard Salesforce mechanism. So we do that with triggers.

What are the pros and cons of having a Master-Detail Case-Order relationship vs. a normal relationship in our situation ?

Cons of our choice today : complex triggers, hitting Apex limits sometimes. Pros of the other choice : nice and easy-to-maintain roll-up fields.

Pros of our choice : can handle Orders not assigned to Cases. Would this still be the case in a Master-Detail relationship scenario ?  Could we not, in such a situation, just attach such Orders to a 'Unknown CaseNumber' Case ?  In the interface, could we create Orders before attaching them to Cases ?  What would the behaviour of the interface be, step by step ?

And the crunch : would it me complicated to migrate to the new design, if it is a better solution for us ?

 

Thanks for your advice,

Rup

  • December 04, 2009
  • Like
  • 0

As already mentioned elsewhere, the 3 ways of attaching an email to a case (Salesforce, Maildrop, and Outlook Edition) use different rules to select the 'closed' status to set on the task/activity they create.

 

It might be a good idea to set this in the Preferences of Maildrop or, even better, have this in the settings of Salesforce.com, accessible via the metadata API for Maildrop and the outlook Edition to read and use.

 

Rup

 

PS : Simon, do you prefer to read this kind of suggestion here or in Ideas ?

  • November 26, 2009
  • Like
  • 0

Hi,

 

In the Facebook toolkit, this sample

 

public class FBToolkitPageController {

public FacebookApp__c fbc { get; set; }

public FacebookConnection fbConnection { get; set; }

public List<String> friendsList { get { return FacebookConnection.friendsList; } set; }

public FBToolkitPageController() {

if (FacebookConnection.fbApp != null) {

System.debug(LoggingLevel.INFO, FacebookConnection.fbApp.AppKey__c);

System.debug(LoggingLevel.INFO, FacebookConnection.fbApp.AppSecret__c);

System.debug(LoggingLevel.INFO, FacebookConnection.fbApp.FBUserId__c);

fbc = FacebookConnection.fbApp;

}

}

 

 is out of date.  Could someone tell me how I can get hold of the current FacebookSession object, once I have connected to Facebook with FacebookConnect ?   On the JavaScript/VisualForce side of things, I can reach it like this :

 

var api = FB.Facebook.apiClient;

var session = api.get_session();

 

 But how do I get hold of this in my controller on the Apex side ?

 

Thanks for your help,

Rup 

 

 

Message Edited by RupB on 15-10-2009 12:28 AM
  • October 14, 2009
  • Like
  • 0

Hi,

I am quite experienced with the Data Loader, but I am stuck, here.

I would like to load Opportunities from a CSV file, including a few fields as constants, so my SDL mapping file includes the following lines :

 

"Order"= Name

"Parts Order"= StageName

"1"= Probability

 

The error message I get is : 2 required fields not inserted : [Name, StageName]. According to the logs, Probability is interpreted correctly, but not Name and neither StageName.

 

Strange, no ?   As it seems to be a string problem, and I am on a French system, I was wondering whether there might be a string/UTF-thing issue, although I tried dataAccess.readUTF8 = "TRUE" also.

 

Any ideas ?  

  • September 07, 2009
  • Like
  • 0

Hi,

I have been around with salesforce.com for 6 years now, and have never been stuck like this.

 

Simple problem : prices interface (one-way) from legacy to salesforce.com

I know how to insert prices which are unknown : there is a solution in salesforce.com online help.

Lack of external ids will not permit me to update or upsert prices.

 

How should this be done ? Please, I need help !!!

Rup

 

PS :Meanwhile, please vote for my idea : ideas.salesforce.com/article/show/10097990

 

  • September 02, 2009
  • Like
  • 0

Hi,

 

- Sorry to bother, but I found no answer to this wuestion either on the web, or in the dev forum, or in the Apex documentation - 

 

I have a trigger, which detects error conditions and feeds errors to the class or field.

This gives a nice result interactively, in the GUI.

But how do I write test code to catch these errors ?  Is there a System.AssertException(), or the equivalent ? 

 

trigger createOrder on Asset (after insert, after update) {[...] if (price.get(a.Product2Id) == NULL) { System.debug(' error : no active price'); a.Product2Id.addError('no active price on the Product'); }[...]}

 

 

 

  • August 31, 2009
  • Like
  • 1

I'm in Console display mode; on Request, I have a custom button creating an opportunity with onClick JavaScript.

What retURL should I use to display the newly created Oportunity ?

For the moment, I have hardcoded

if (newOppId != '') { window.location.replace("/" + newOppId)}

This redisplays the opportunity AND all the decoration (sidebar, top bar) inside the Console main panel; I would like to display the opportunity, just as if the user had asked to create it in the same Console mode.

 

  • July 19, 2009
  • Like
  • 0

I find SOQLXplorer to be a fantastic tool.

 

At first, I wondered what it could be used for.

Now that I do dev work, I use it all the time. I never look at the API reference manual, I browse through the real model of my dev environment, presented by SOQLXplorer. I can then check/query/delete/update data in the same tool as the schema : so great !

 

What I would like (I know it must be there, somewhere, but I would like it to be more practical) is for the Schema view to display certain field features :

- read-only : maybe they could be in italics

- required : maybe they could be flagged by a '*'

- picklists : right-click to display accepted values

- mark keys somehow - and foreign keys 

- maybe a toggle option could be used to display/hide the data type of each field

 

Another extension could be to allow mass update of selected rows in the query view, by updating the selected rows with the same value for the field you wish to change.

 

Great tool !  Keep up the good work, updating the MacOS version !

 

Cheers,

Rup 

  • July 17, 2009
  • Like
  • 0

Hi,

 

I have a Task related to a Case. When I set a given Status on the Task, I would like to set a certain flag on the related Case.

JavaScript Onclick is working well for me to update Task fields; can anyone help me update the related Case ?

 

example :

 

{!REQUIRESCRIPT("/soap/ajax/16.0/connection.js")}var task = {!GETRECORDIDS( $ObjectType.Task )};task.Status = 'CS Decision expected';

 

// FIXME, please :
// case = task.Case;   // get related Case
// case.Flag__c = 'CS Decision requested by plant';   // update flag on Case
// sforce.connection.update(case);
 

var result = sforce.connection.update(task);if (result[0].getBoolean("success"){ window.location.reload();}else{ alert("Error"); 

} 

  • June 29, 2009
  • Like
  • 0

Hi,

On a workflow, I am concatenating Subject and Description on Case; I would like to add a line break between the two, but none of the following work :

 

Subject + "\n" + Description

Subject + '\n' + Description

Subject + "<br>" + Description

 

What should I use ?

 

RUp 

  • June 10, 2009
  • Like
  • 0

The SDL mapping is great and lets separate teams work on getting the data OUT of a legacy system, while others work on getting it INTO salesforce.com .

 

I have discovered that you can force a field to a fixed value : great for setting "Active = TRUE" on a product, for example.

 

But how can I map  a row from a CSV file onto 2 different salesforce entity fields ?

I would like to do this to load a read-only copy of the legacy value (eg of account address) and load the same initial value into another read-write address field.

  • May 27, 2009
  • Like
  • 0

Hi,

 

- Sorry to bother, but I found no answer to this wuestion either on the web, or in the dev forum, or in the Apex documentation - 

 

I have a trigger, which detects error conditions and feeds errors to the class or field.

This gives a nice result interactively, in the GUI.

But how do I write test code to catch these errors ?  Is there a System.AssertException(), or the equivalent ? 

 

trigger createOrder on Asset (after insert, after update) {[...] if (price.get(a.Product2Id) == NULL) { System.debug(' error : no active price'); a.Product2Id.addError('no active price on the Product'); }[...]}

 

 

 

  • August 31, 2009
  • Like
  • 1
I've finally started using MailDrop : so great, and simple ! 
Most of the time, I am attaching an email to a case : 
. the sender's email lets MailDrop find the Contact : please select this by default if only 1 Contact is found, 
. the result of Search lists the Cases I am looking for : please select this by default if only 1 Case is found 
. please generalize to other objects. 

Keep up the great work (and maintenance) ! 

Rup
  • November 25, 2009
  • Like
  • 0

Hi,

 

In the Facebook toolkit, this sample

 

public class FBToolkitPageController {

public FacebookApp__c fbc { get; set; }

public FacebookConnection fbConnection { get; set; }

public List<String> friendsList { get { return FacebookConnection.friendsList; } set; }

public FBToolkitPageController() {

if (FacebookConnection.fbApp != null) {

System.debug(LoggingLevel.INFO, FacebookConnection.fbApp.AppKey__c);

System.debug(LoggingLevel.INFO, FacebookConnection.fbApp.AppSecret__c);

System.debug(LoggingLevel.INFO, FacebookConnection.fbApp.FBUserId__c);

fbc = FacebookConnection.fbApp;

}

}

 

 is out of date.  Could someone tell me how I can get hold of the current FacebookSession object, once I have connected to Facebook with FacebookConnect ?   On the JavaScript/VisualForce side of things, I can reach it like this :

 

var api = FB.Facebook.apiClient;

var session = api.get_session();

 

 But how do I get hold of this in my controller on the Apex side ?

 

Thanks for your help,

Rup 

 

 

Message Edited by RupB on 15-10-2009 12:28 AM
  • October 14, 2009
  • Like
  • 0

Hi,

 

- Sorry to bother, but I found no answer to this wuestion either on the web, or in the dev forum, or in the Apex documentation - 

 

I have a trigger, which detects error conditions and feeds errors to the class or field.

This gives a nice result interactively, in the GUI.

But how do I write test code to catch these errors ?  Is there a System.AssertException(), or the equivalent ? 

 

trigger createOrder on Asset (after insert, after update) {[...] if (price.get(a.Product2Id) == NULL) { System.debug(' error : no active price'); a.Product2Id.addError('no active price on the Product'); }[...]}

 

 

 

  • August 31, 2009
  • Like
  • 1

I find SOQLXplorer to be a fantastic tool.

 

At first, I wondered what it could be used for.

Now that I do dev work, I use it all the time. I never look at the API reference manual, I browse through the real model of my dev environment, presented by SOQLXplorer. I can then check/query/delete/update data in the same tool as the schema : so great !

 

What I would like (I know it must be there, somewhere, but I would like it to be more practical) is for the Schema view to display certain field features :

- read-only : maybe they could be in italics

- required : maybe they could be flagged by a '*'

- picklists : right-click to display accepted values

- mark keys somehow - and foreign keys 

- maybe a toggle option could be used to display/hide the data type of each field

 

Another extension could be to allow mass update of selected rows in the query view, by updating the selected rows with the same value for the field you wish to change.

 

Great tool !  Keep up the good work, updating the MacOS version !

 

Cheers,

Rup 

  • July 17, 2009
  • Like
  • 0

Hi all -


I'm struggling with how to set a date field to today() using a custom button's on click javascript.

 

I'm using the button to set the value of two picklist values, set a date field to Today() and set a second date field to Today()+180.

 

When I first wrote it and tested it earlier in the week, it was executing but was setting the wrong dates. Today it just errors out.

 

 

{!requireScript("/soap/ajax/13.0/connection.js")} var QR= new sforce.SObject("Quote_Request__c"); QR.id = "{!Quote_Request__c.Id}"; var temp_dev_date=new Date(); temp_dev_date.setDate({!TODAY()}) var temp_val_date=new Date(); temp_val_date.setDate({!TODAY()}+180) QR.Delivered_Date__c=temp_dev_date; QR.Validity_Date__c=temp_val_date; QR.Customer_Requirements__c="Test update of auto close button."; QR.Status__c="Closed - Completed"; QR.Stage__c="Delivered"; var result = sforce.connection.update([QR]); if (result[0].getBoolean("success")) { // Refresh window window.location.reload(); } else { alert("something broke"); }

 

Appreciate any guidance or other approaches that could be used to accomplish this.

The SDL mapping is great and lets separate teams work on getting the data OUT of a legacy system, while others work on getting it INTO salesforce.com .

 

I have discovered that you can force a field to a fixed value : great for setting "Active = TRUE" on a product, for example.

 

But how can I map  a row from a CSV file onto 2 different salesforce entity fields ?

I would like to do this to load a read-only copy of the legacy value (eg of account address) and load the same initial value into another read-write address field.

  • May 27, 2009
  • Like
  • 0
Doesn't seem like it is possible to use external ids to perform a delete operation using Data Loader?

 

I am already using Data Loader upsert to perform initial blulk data load and incremental insert/update.  I am automating the incremental insert/update using the batch mode of data loader.

 

How do I do automated deletes as they happen in external system? Seems like Data loader wants the actual salesforce ids...

 

 

 

 

 

Message Edited by GoForceGo on 04-28-2009 05:20 PM

Mail Drop is working great but every email I add to SF, under the status column in the activity history shows "Wrap Completed" but we need it to show Completed only.

 

I can go in and edit it to change the status but I don't want to do this for every email I add, I send out about 100 emails / day and it would add so much work and would be time consuming.  

 

There are no options in Mail Drop to be able to change the status when adding an email activity.  Which side is the problem, SF or Mail Drop and how can I fix it so it reads "Completed" when I add emails?

 

Please help!

 

Thanks. :) 

  • March 13, 2009
  • Like
  • 0

Hi,

I am importing data through DataLoader.I am getting the following error when I load the data.

 

Subscription Start Date: invalid date: Wed May 15 00:00:00 GMT 9

 

Subscription Start Date is Date type field.

 

How to over come this?

 

Thanks.

  • March 02, 2009
  • Like
  • 0

Hello All,

 

I want to setup "indicator" fields on the Case object that indicate NEW Case Comments or Emails exist on a Case. The idea is that when a support rep clicks on the Cases tab to view a list of cases they own, there will be 'New Comment' and 'New Email' columns that have a visual indicator next to each case that indicate there are new Comments or Emails on the Case. The indicator could be a checkbox, or a colored dot, or something similar.

 

Salesforce appears to have this functionality built-in to some degree:

 

- For Case Comments, when a new comment is added to a Case through the Self-Service portal or Customer Portal,  there will be an icon at the top of the Case (next to the Case Number heading) that indicates there is a new comment on the case. See attached image  - new-comment-email.gif - for example. When a Case Owner views the case, this icon goes away - I have to assume that the act of viewing the case changed the "status" of the comment to make the icon go away.

 

- For Emails, with email-to-case enabled, when a new email is received and associated with a Case, the email in the Emails related list has a Status of "New". See attached image - new-comment-email.gif - for example. When the Case Owner views the email, the Status changes from "New" to "Read". The act of viewing the email has changed the Status value of the email.

 

I would like to leverage this functionality are create custom Case field "indicators" that I can put on list views. For Case Comments, I would like for the indicator to show new Case Comments made by ANY person, not just Self-Service/Customer Portal users.

 

Does anyone know how I would acheive this? How can I build a field that indicates the existence of New Case Comments or Emails on Cases?

 

Any details or advice that you can provide would be greatly appreciated.

 

Thanks,

 

-- Rob 

We've got a VF wizard that collects some data from the user, and then constructs an Opp+OppContactRole.  That works fine.  What we'd like to happen next is for the user to be dumped into the product selection screen, and then after they choose products, to be brought back to the edit page for the opportunity.

I can get all of that to work except for the last part.  After product selection, they end up back at the View page for the opp.

In the VF code I currently have as the redirect:

Code:
PageReference newOpp = new PageReference('/ui/opportunity/SelectSearch—addTo=' + opportunity.id +'&retURL=/' + opportunity.id + '/e');

This correctly redireects to the product selection routine, but is there anything I can add to the querystring to force it to come back to opp edit afterward.  It's not realistic for me to re-engineer product selection in VF, so hopefully there's an easier way.

Thanks!
 

  • October 18, 2008
  • Like
  • 0
Hello
 
I would like to know if the following is possible to achieve:
 
when i try to add a product to the opportunity, i am taken to a product selection page and then after selecting the porduct i am am taken to a page that is called MultiLineItem.jsp.
 
I am trying to figure out a way where we can add custom fields to this page. We want to see profit margin and base margin upon changing the sales price and qty of the product.
 
Can anybody help? Many thanks in advance.
  • February 29, 2008
  • Like
  • 0