• CNishant
  • NEWBIE
  • 45 Points
  • Member since 2014


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 14
    Replies
Hi ,

 Im trying to deploy changes using ANT migration tool.

I'm getting below error. Please help me. Any help is really appreciated.
API Name Type        Line   Column     Error Message
Account  Custom Object 0 0 Custom Field Definition ID: bad value for restricted picklist field: RecordType

Thanks,
Naveen
global class ScheduledApexOnCase implements Schedulable {    
 
    global void execute(SchedulableContext sc) {
     
    Date today = system.today();
    Decimal caseAge;
    List<case> newCaseList = new List<case>();
     
    BusinessHours stdBusinessHours = [select id from businesshours where isDefault = true];
    newCaseList = [Select id, CreatedDate, Status, CaseAge__c from Case]; //CaseAge__c is a Text field
    for(Case eachCase: newCaseList) {        
        if(eachCase.Status != 'Closed') 
            caseAge = BusinessHours.diff(stdBusinessHours.id, eachCase.CreatedDate, today) / 1000 / 3600; 
        else
            caseAge = BusinessHours.diff(stdBusinessHours.id, eachCase.CreatedDate, eachCase.ClosedDate) / 1000 / 3600;
        eachCase.CaseAge__c = String.valueOf(caseAge) + ' hours';        
    }
    update newCaseList;
    }    
}

Here iam getting  Compile Error: Illegal assignment from String to Decimal at line 16 column 9, How to solve the above scenario please give me some ideas
Trying to complete this Challenge, but keep getting the following error despite many variations on trying to load the file.  I think I've also completed the rest of the challenge, but am unable to even check since I can't seem to get past this first "easy" part.  Thoughts?
 


  • {!c.Name}

Here are the directions:

Use Bootstrap to create a simple mobile friendly list of existing contact names and display the page within Salesforce1 mobile. The Visualforce page:Must be named 'MobileContactList'.
Must reference the minified Bootstrap JavaScript and CSS files from MaxCDN (see more here). Do NOT use Static Resources to reference these files.
Must use the Bootstrap List Group component (defined here).
Must use the Contact standard list controller with a recordSetVar of 'contacts'. The list of contacts must be iterated through using an apex:repeat component that's bound to a var named 'c'.
Must display the name of the contacts.
Must be made available for the Salesforce1 mobile app and added to a tab named 'MobileContacts'. The tab should be added to the Salesforce1 navigation menu.
Please help!  I am stuck on creating flows.  Can't seem to work.  I keep on re-doing my work and not sure if I am doing it right.  The challlenge as follows:

To pass this challenge you will need to create a flow that implements the business process of Account, Contact, and Opportunity data entry and place it on a Visualforce page.The Flow will need to be called 'New Customer Flow'.
The Flow should have a screen with fields for First Name, Last Name, Company Name, Opportunity Amount, and Opportunity Stage.
The Flow needs to have steps to create an account, a contact, and an opportunity from the data entered.
Opportunity name, close date and stage are required fields. Name the Opportunity '{Company Name} - {Last Name}', set the close date to one month from today and set the stage to 'Prospecting'.
The Flow should be invoked from a Visualforce page.
The Visualforce page should be called FlowPage.
The Visualforce page will need a component to reference the 'New Customer Flow' process.

If possible, if you can provide a snapshot.

Thank you.
Hello,

I want to export field level security(Read Only,Visible) of objects by profile using apex.

i have tried using fieldPermission,PermissionSet,ObjectPermission object. but the value i am  getting is not as per the Expectation(As per field level security on profile). 

im planning to have this sheet as reference to see all the fields of an object if they are Read Only ot Visible.
Hi there, I 'm trying to complete the "Automating Processes with the Lightning Process Builder" challenge in TrailHead but I get the following error :
Encountered unhandled fault when running process Update_contact_adress/
301240000004FXO exception by user/organization: 00D24000000JsNt/{4}

The flow failed to access the value for myVariable_current.Account.ShippingCountry because it hasn't been set or assigned.
caused by element : FlowRecordUpdate.myRule_1_A1
caused by: The flow failed to access the value for myVariable_current.Account.ShippingCountry because it hasn't been set or assigned.
Salesforce Error ID: 490660201-42718 (736882147)

Any idea what could be could wrong ?
 
I completed the example and the challenge but it doesn't seem to be working 100% or I am missing something.

For the Example, if I create a tab for it is says

java.lang.reflect.InvocationTargetException
Error is in expression '{!componentBody}' in component <apex:page> in component interview.apexc
when I go to the tab.

For the Challenge, if I create a tab and enter this information
First Name John
Last Name Smith
Company Name Misc Co
Opportunity Amount 100
Opportunity Stage Prospecting

It says
An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information.

Thanks.
This challenge seems simple enough but I'm stuck and any help would be appreciated. 

So the Challenge is Create a validation rule to check that a contact is in the zip code of its account. here is the question below:
To complete this challenge, add a validation rule which will block the insertion of a contact if the contact is related to an account and has a mailing postal code (which has the API Name MailingPostalCode) different from the account's shipping postal code (which has the API Name ShippingPostalCode).Name the validation rule 'Contact must be in Account ZIP Code'.
A contact with a MailingPostalCode that has an account and does not match the associated Account ShippingPostalCode should return with a validation error and not be inserted.
The validation rule should ONLY apply to contact records with an associated account. Contact records with no associated parent account (hint: you can use the ISBLANK function for this check) can be added with any MailingPostalCode value

Here is my  work.. Any help would be appreciated.. thanks, 

Rule Name Contact_must_be_in_Account_ZIP_Code Active [Checked]
Error Condition Formula AND( BillingPostalCode = ShippingPostalCode )
Error Message Billing zipcode does not match the Shipping Zipcode Error Location Billing Zip/Postal Code



 
Hey Friend,

I m creating email 3 template
Eg.1)Thank you for submitted issue.2)issue assigned to user 3)your issues has been solved.
and then creating 3 workflow.
Now I want page layout for this 3 different workflow.
I m creaing 3 pagelayout
1)submitted issue
2)assigned user
3)issue resolved

Now what the next  Process i want to follow???/??

Is it possible to write a trigger on the Opportunity Split Object?

  • December 07, 2013
  • Like
  • 0

Hi,

How to update the group of fields using batch apex class. I am update the single field using batch apex class. But am unable to update group of fields. Any one help me for solving these. I am follow the class for single field updation 

 

}

global class BatchUpdateField implements Database.Batchable<sObject>{
global final String Query;
global final String Field;
global final String Value;
global BatchUpdateField(String q, String f, String v){
Query = q;
Field = f;
Value = v;
}
global Database.QueryLocator start(Database.BatchableContext BC){
return Database.getQueryLocator(query);
}
global void execute(Database.BatchableContext BC, List<sObject> scope){  
for(sobject s : scope){
s.put(Field,Value);
}

update scope;
}
global void finish(Database.BatchableContext BC){  
AsyncApexJob a = [Select Id, Status, NumberOfErrors, JobItemsProcessed,TotalJobItems,CreatedBy.Email
from AsyncApexJob where Id = :BC.getJobId()];
string message = 'The batch Apex job processed ' + a.TotalJobItems + ' batches with '+ a.NumberOfErrors + ' failures.';
// Send an email to the Apex job's submitter notifying of job completion.
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
String[] toAddresses = new String[] {a.CreatedBy.Email};
mail.setToAddresses(toAddresses);
mail.setSubject('Salesforce BatchUpdateField ' + a.Status);
mail.setPlainTextBody('The batch Apex job processed ' + a.TotalJobItems + ' batches with '+ a.NumberOfErrors + ' failures.');
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });  
}

 

using the query for execution from systemlog:

 

Database.executebatch(batch,200);

string query='select id,website from account';
batchupdatefield batch=new batchupdatefield(query,'website','www.dskvap.com');

Hello,

 

Our sales team has multiple reps (upto 4) working on the same opportunity at a time.  What's the best way to split the opportunity amount amongst the four reps without adversly affecting:

Reporting - each sales rep should be able to run their own sales revenue report.

Forecasting - the executive team should be able to run a sales revenue report without double or tripple counting amount values.

Products - Schedules should be associated with the opportunity in a way to allow for spliting of the associated revenue based on a split %.

Future integrations - Integrations with other web services, like incentive calculation for sales rep, should not be adversely impacted by the solution implemented.  In other words, we should be able to send over unique Opportunities without an issue.

 

Are there any suggestions or recommendations for solutions to this Split Opportunity question?

 

Regards,

 

PS - I'm posting after having opened a support ticket and reviewed the idea for split opty's on ideas.

http://sites.force.com/ideaexchange/ideaView?id=08730000000BowoAAC