• nkbk0108
  • NEWBIE
  • 10 Points
  • Member since 2011
  • CRM Coordinator

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 10
    Questions
  • 1
    Replies
Hi
We have Salesforce CPQ and at the time of implementation we had assistance from a consultant and developers to help us create a lot of the processes and buttons. We have one button right now that is no longer working and neither I or our the other Admin can figure out why this has stopped working.
What is supposed to do is prevent certain profiles from change the Status field on the Quote. If the Status is Custom Quote Requested and they click the Back to Draft button (code below) they would get an error. Right now it allows the status to be changed to Draft

{!REQUIRESCRIPT("/soap/ajax/52.0/connection.js")}

if("{!$Profile.Name}" == "System Administrator" ||
"{!$Profile.Name}" == "Contracts/Legal" ||
"{!$Profile.Name}" == "Field Sales AE, AM, CSM (Sales)" ||
"{!$Profile.Name}" == "Business Development (Sales)" ||
"{!$Profile.Name}" == "Channel Online (Sales)" ||
"{!$Profile.Name}" == "Client Service (Sales)" ||
"{!$Profile.Name}" == "Inside Sales AEs" ||
"{!$Profile.Name}" == "Sales Channel Tech & Financial" ||
"{!$Profile.Name}" == "Reseller (Sales)" ||
"{!$Profile.Name}" == "Sales Operations" ||
"{!$Profile.Name}" == "Sales Operations II" ||
"{!$Profile.Name}" == "Production Coordinator" ||
"{!$Profile.Name}'" == "Production Manager" ||
"{!SBQQ__Quote__c.SBQQ__Status__c}" == "Custom Quote Completed" ||
"{!SBQQ__Quote__c.SBQQ__Status__c}" == "Custom Quote Rejected" ||
"{!SBQQ__Quote__c.SBQQ__Status__c}" == "Approved" ||
"{!SBQQ__Quote__c.SBQQ__Status__c}" == "Rejected")
{
var quote = new sforce.SObject("SBQQ__Quote__c");
quote.Id = "{!SBQQ__Quote__c.Id}"; //Setting the ID of the Current Quote Record
quote.SBQQ__Status__c = "Draft"; //Setting the Status Picklist to Draft
var resultQuote = sforce.connection.update([quote]); //Updating the Quote Record
javascript: document.location.reload(true);
}
else
{
alert("Quote cannot be set Back to Draft from Custom Quote Requested status - contact your DDS Consultant.");
}
DescriptionSets the Status back to Draft, once the Quote meets certain criteria

Hi
I've been brought in on a projectand have been tasked with creating a new formula field based on another formula field.
I need to use the field that is a result of this formula in another formula and I'm running into an error do the the number of characters. Can you somoene help me shorten this formula?
Thanks in advance.

Nancy

IF(CONTAINS( Segment_Label__c , '2'), DATE(YEAR( Order.Est_RevRec_St_Date_for_ord__c ) + 1, MONTH(Order.Est_RevRec_St_Date_for_ord__c), DAY(Order.Est_RevRec_St_Date_for_ord__c)),
IF(CONTAINS( Segment_Label__c , '3'), DATE(YEAR(Order.Est_RevRec_St_Date_for_ord__c) + 2, MONTH(Order.Est_RevRec_St_Date_for_ord__c), DAY(Order.Est_RevRec_St_Date_for_ord__c)),
IF(CONTAINS( Segment_Label__c , '4'), DATE(YEAR(Order.Est_RevRec_St_Date_for_ord__c) + 3, MONTH(Order.Est_RevRec_St_Date_for_ord__c), DAY(Order.Est_RevRec_St_Date_for_ord__c)),
IF(CONTAINS( Segment_Label__c , '5'), DATE(YEAR(Order.Est_RevRec_St_Date_for_ord__c) + 4, MONTH(Order.Est_RevRec_St_Date_for_ord__c), DAY(Order.Est_RevRec_St_Date_for_ord__c)),
IF( AND (OR(TEXT(Order.Opportunity.Type)= 'Renewal',TEXT(Order.SBQQ__Quote__r.SBQQ__Type__c)='Renewal') , TEXT(Delivery_Frequency__c) <> "One-Time" ), Order.Contract_Start_Date__c ,
TRAC_EstDate__c - DAY(TRAC_EstDate__c) +1 )))))

Hi
We are having an issue with the Submit For Approval button we had created for our CPQ Quotes. We have a rule that you can't submit a quote under $250.00. This was working fine until we found out there is a rounding issue with some of the quotes and we end up with quotes totaling $0.01. We have tried to update the code to allow for up to $0.05 but we still run into the error. Would someone be able to review the code below and let us know what needs to change? Thanks in Advance :)
Nancy 

//IF is_custom == "0" and Net_Total < 250 and Net_Total != .05 
// alert("Cannot submit for approval quotes under $250.00") 

{!REQUIRESCRIPT('/soap/ajax/40.0/connection.js')} 

//Remove $ sign from currency field 
var netAmount = '{!SBQQ__Quote__c.SBQQ__NetAmount__c}'; 
var actualValue = netAmount.substr(1, netAmount.length-1); 

if ( actualValue <250.00 && actualValue != 0.5 ){ 
//Display message 
alert("Cannot submit for approval quotes under $250.00"); 
} else 

if ('{!SBQQ__Quote__c.Is_Custom__c}' == "1" && '{!SBQQ__Quote__c.SBQQ__Status__c}' != "Custom Quote Approved" ){ 
//Display message 
alert("Cannot submit for approval unless the Quote is in Custom Quote Completed Status."); 
} else 

if ('{!SBQQ__Quote__c.Quote_requires_Approval__c}' == "0"){ 
//Retrieve Record Type Id 
var recordtype= sforce.connection.query("SELECT id, name FROM recordtype WHERE SobjectType = 'SBQQ__Quote__c' AND name='Approved'"); 
var records = recordtype.getArray("records"); 

//Create quote to update 
var quote = new sforce.SObject("SBQQ__Quote__c"); 
quote.Id = '{!SBQQ__Quote__c.Id}'; //ID of the Current Quote Record 
quote.SBQQ__Status__c = "Approved"; //Setting Status Picklist to Approved 
quote.RecordTypeId = records[0].Id;//'01234000000475IAAQ'; //Setting RecordType to "Approved" 

//Update quote 
var result = sforce.connection.update([quote]); //Updating the Quote Record 
var isSuccess = result[0].getBoolean("success"); 

//Display error or success message 
if (!isSuccess) { 
alert(result[0].get("errors").get("message")); 
} else { 
alert("This quote does not require approval, so it will be automatically Approved.");


//Refresh page 
document.location.reload(true); 

} else { 

if (('{!SBQQ__Quote__c.Is_Custom__c}' == "0" && '{!SBQQ__Quote__c.SBQQ__Status__c}' == "Draft") || ('{!SBQQ__Quote__c.SBQQ__Status__c}' == "Custom Quote Approved" && '{!SBQQ__Quote__c.Is_Custom__c}' == "1" ) ) { 
//Submit the Quote for Approval 
var request = new sforce.ProcessSubmitRequest(); 
request.objectId = '{!SBQQ__Quote__c.Id}'; 
var processRes = sforce.connection.process([request]); 
location.reload(); 
} else { 
//Display error message 
alert("Cannot submit for approval unless the Quote is in Custom Quote Completed Status, or is in Draft Status and does not require a Custom Quote."); 

}
Hi
How can we increase our rollup summary limit from 25 to 40 on a custom object?

We are in the middle of a build of our Salesforce CPQ system and are hitting our limit.

Thank you
Nancy
Hi

I have created a custom object "Migrations". It has a look up relationship to the Account Object because I need to be able to pull history on a field called "Migration Stage". Now I've been asked to pull in some fields from the Account Object, but I can't do this because it's not setup with a Master Detail Relationship to the Account Object. How can create a formula field or get information from the Account Object?

Thank you
Nancy

Hi

 

I want to create a report that will show me when there are changes at the Account Team level. I know there is not a history on that object, does anyone have any ideas on how I can report on it or create an analytic snapshot to help me show how many times account team members are changing?

 

Thank you

Nancy

Good Morning,

I have been tasked with creating a pricing tool for my company.

I'm asking for some guidance from all the the experts out here. :)

I have creating a custom object called Pricing Tool, it has basic fields, and some formula fields bring in account name, etc. I  need to be able to add buttons that would make it possible to add products to the tool. The button would be "Add Product", my first question would be how can I connect that button to then open up the existing Product object? If I need to create a visualforce page where inthe page do I say go get the Product object information and connect it to this button.

My next question is on field dependencies, is it possible to have field dependencies on a multi-picklist? I need to be able to create a tool where sales would pick product 1, but when you pick product 1, sub products a, b, c come with it automatically and then there's a list of optional sub products that you can add, and again if you choose on of those there may be products that come with those automatically.

Ex.
Product 1 - comes with a,b,c
optional - e, f, g,
choose g.
Product G Options h, j, k

In the end I have a list of the products the sales person wants in the quote that can then be used to create a contract.

I know that there are existing apps out theres, ex. cameleon, but we do not have the budget, so I'm hoping to be able to create this with what exists in salesforces, (product, quote, contract objects) and enhance with visualforce pages.

At some point I will need to bring in a consultant to assit with the finishing touches and/or guide me, as I'm currently training on visualforce. If there are other elements that I need to learn, would also love some guideance/suggestions.

Thank you for your thoughts, ideas.
Nancy

Hi.

We are trying to get a case age formual to work like one that we currently have in an excel spreadsheet.

Custom Date Fields:
Date Opened - 1/3/2012 9:43am
Date Resolved - 1/18/2012 8:42am

Excel Formula: =IF(C5654="",0,(NETWORKDAYS(B5654,C5654,holidays)-1)*(end-start)+IF(NETWORKDAYS(C5654,C5654,holidays),MEDIAN(MOD(C5654,1),
end,start),end)-MEDIAN(NETWORKDAYS(B5654,B5654,holidays)*MOD(B5654,1),end,start))

EXCEL Age in Business Hours: 120:17

Salesforce Formula:
If(IsNull(Date_Resolved__c ),

CASE(MOD( DateValue(Date_Opened__c ) - DATE(1985,6,24),7), 0 ,
CASE( MOD( Today() - DateValue(Date_Opened__c ) ,7),1,2,2,3,3,4,4,5,5,5,6,5,1), 1 ,
CASE( MOD( Today() - DateValue(Date_Opened__c ) ,7),1,2,2,3,3,4,4,4,5,4,6,5,1), 2 ,
CASE( MOD( Today() - DateValue(Date_Opened__c ) ,7),1,2,2,3,3,3,4,3,5,4,6,5,1), 3 ,
CASE( MOD( Today() - DateValue(Date_Opened__c ) ,7),1,2,2,2,3,2,4,3,5,4,6,5,1), 4 ,
CASE( MOD( Today() - DateValue(Date_Opened__c ) ,7),1,1,2,1,3,2,4,3,5,4,6,5,1), 5 ,
CASE( MOD( Today() - DateValue(Date_Opened__c ) ,7),1,0,2,1,3,2,4,3,5,4,6,5,0), 6 ,
CASE( MOD( Today() - DateValue(Date_Opened__c ) ,7),1,1,2,2,3,3,4,4,5,5,6,5,0), 999)
+ (FLOOR(( Today() - DateValue(Date_Opened__c ) )/7)*5-1)*11,

CASE(MOD( DateValue(Date_Opened__c ) - DATE(1985,6,24),7), 0 ,
CASE( MOD( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) ,7),1,2,2,3,3,4,4,5,5,5,6,5,1), 1 ,
CASE( MOD( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) ,7),1,2,2,3,3,4,4,4,5,4,6,5,1), 2 ,
CASE( MOD( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) ,7),1,2,2,3,3,3,4,3,5,4,6,5,1), 3 ,
CASE( MOD( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) ,7),1,2,2,2,3,2,4,3,5,4,6,5,1), 4 ,
CASE( MOD( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) ,7),1,1,2,1,3,2,4,3,5,4,6,5,1), 5 ,
CASE( MOD( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) ,7),1,0,2,1,3,2,4,3,5,4,6,5,0), 6 ,
CASE( MOD( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) ,7),1,1,2,2,3,3,4,4,5,5,6,5,0), 999)
+ (FLOOR(( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) )/7)*5-1))*11


SALESFORCE Age in Business Hours: 121.00

How can I get the SFDC formula to stop rounding? I think that's what it's doing.

I've already submitted this as a case with Salesforce and the only suggestion is that the DateValue will cause the time to be calculated on a full day base. If I replace it with Date I get the error: Incorrect parameter type for operator '-'. Expected Number, DateTime, received Date.

 

If anyone has any suggestions, I really need to make this work in Salesforce.

 

Thanks

Nancy

Hi.

We are trying to get a case age formual to work like one that we currently have in an excel spreadsheet.

Custom Date Fields:
Date Opened - 1/3/2012 9:43am
Date Resolved - 1/18/2012 8:42am

Excel Formula: =IF(C5654="",0,(NETWORKDAYS(B5654,C5654,holidays)-1)*(end-start)+IF(NETWORKDAYS(C5654,C5654,holidays),MEDIAN(MOD(C5654,1),
end,start),end)-MEDIAN(NETWORKDAYS(B5654,B5654,holidays)*MOD(B5654,1),end,start))

EXCEL Age in Business Hours: 120:17

Salesforce Formula:
If(IsNull(Date_Resolved__c ),

CASE(MOD( DateValue(Date_Opened__c ) - DATE(1985,6,24),7), 0 ,
CASE( MOD( Today() - DateValue(Date_Opened__c ) ,7),1,2,2,3,3,4,4,5,5,5,6,5,1), 1 ,
CASE( MOD( Today() - DateValue(Date_Opened__c ) ,7),1,2,2,3,3,4,4,4,5,4,6,5,1), 2 ,
CASE( MOD( Today() - DateValue(Date_Opened__c ) ,7),1,2,2,3,3,3,4,3,5,4,6,5,1), 3 ,
CASE( MOD( Today() - DateValue(Date_Opened__c ) ,7),1,2,2,2,3,2,4,3,5,4,6,5,1), 4 ,
CASE( MOD( Today() - DateValue(Date_Opened__c ) ,7),1,1,2,1,3,2,4,3,5,4,6,5,1), 5 ,
CASE( MOD( Today() - DateValue(Date_Opened__c ) ,7),1,0,2,1,3,2,4,3,5,4,6,5,0), 6 ,
CASE( MOD( Today() - DateValue(Date_Opened__c ) ,7),1,1,2,2,3,3,4,4,5,5,6,5,0), 999)
+ (FLOOR(( Today() - DateValue(Date_Opened__c ) )/7)*5-1)*11,

CASE(MOD( DateValue(Date_Opened__c ) - DATE(1985,6,24),7), 0 ,
CASE( MOD( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) ,7),1,2,2,3,3,4,4,5,5,5,6,5,1), 1 ,
CASE( MOD( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) ,7),1,2,2,3,3,4,4,4,5,4,6,5,1), 2 ,
CASE( MOD( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) ,7),1,2,2,3,3,3,4,3,5,4,6,5,1), 3 ,
CASE( MOD( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) ,7),1,2,2,2,3,2,4,3,5,4,6,5,1), 4 ,
CASE( MOD( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) ,7),1,1,2,1,3,2,4,3,5,4,6,5,1), 5 ,
CASE( MOD( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) ,7),1,0,2,1,3,2,4,3,5,4,6,5,0), 6 ,
CASE( MOD( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) ,7),1,1,2,2,3,3,4,4,5,5,6,5,0), 999)
+ (FLOOR(( DateValue(Date_Resolved__c ) - DateValue(Date_Opened__c ) )/7)*5-1))*11


SALESFORCE Age in Business Hours: 121.00

How can I get the SFDC formula to stop rounding? I think that's what it's doing.

 

The Case Age App doesn't work for what we need. We need the age before, during and after close.
 

THANK YOU SO MUCH!
Nancy

Hello

I want to create a workflow on the Case Object.

What we would like to have happen is:

The Case Owner should change to who ever is the current Support Owner, when Resolution Type is changed to "Escalate Client Services", Unless Support Owner is blank. (I have another workflow in place to take care of this part).

Current Object: Case
Fields:

Case Owner (Lookup)

Support Owner (Custom Field, Formula, Lookup) populated originally on the Account Object

Resolution Type (Picklist).

 

I'm fairly new to Apex Triggers so if that's the path I need to take, I would appreciate any assistance. :)

 

I hope this makes sense.

Thanks
Nancy

Hello

I want to create a workflow on the Case Object.

What we would like to have happen is:

The Case Owner should change to who ever is the current Support Owner, when Resolution Type is changed to "Escalate Client Services", Unless Support Owner is blank. (I have another workflow in place to take care of this part).

Current Object: Case
Fields:

Case Owner (Lookup)

Support Owner (Custom Field, Formula, Lookup) populated originally on the Account Object

Resolution Type (Picklist).

 

I'm fairly new to Apex Triggers so if that's the path I need to take, I would appreciate any assistance. :)

 

I hope this makes sense.

Thanks
Nancy

I have started using Salesforce in my new company but for now the use is very basic- feeding/pulling out customer database. I want to learn full-fledged Saelsfroce and excel in it, I am from non-developer/non-coding background. I have started learning the Salesforce Admin modules viaTrail Head.
It will be great if somebody can guide me since Salesforce is huge and I want to go step-by-step and learn each and every component of Salesforce applications. What could be the best way? What should I follow excatly?
Thank you
  • January 25, 2017
  • Like
  • 3