Closed

[url removed, login to view] Java Click-to-Apex

I need a [url removed, login to view] developer to solve the below for me. It should be very simple, with hopefully just a couple lines of code needed.

I've written the below Apex Class, which is called by the below OnClick JavaScript button on my custom Salesforce Object Interview.

The code works PERFECTLY when run in my Developer org, but when I launch it to Production (through a managed package) it does nothing.

I'd like someone to edit the code (or provide settings instructions) to make sure it will work in Production. Please help!

********** APEX CLASS **********

global class CreateInvoiceLines {

WebService static void CreateLines(string id) {

Interview__c i = [SELECT Id, Start_Date__c, Base_Salary_Hired__c, Opportunity__c, Fee_Payments__c, Fee_Percent__c, Lion__c, Lion_Name__c FROM Interview__c WHERE Id = :id LIMIT 1];

//fill the invoice line details

List<Invoice_Line__c> lines = new List<Invoice_Line__c>();

for(Integer x = 0; x < i.Fee_Payments__c; x++){

Invoice_Line__c l = new Invoice_Line__c(

Name = i.Lion_Name__c + ' - quarterly fee ' + (x+1) + ' of ' + i.Fee_Payments__c,

Interview_Detail__c = [url removed, login to view],

Invoice_Line_Amount__c = i.Base_Salary_Hired__c * i.Fee_Percent__c * 0.01);

List<Invoice__c> invoices = [SELECT Id, Opportunity__c, Date_Sent__c FROM Invoice__c WHERE Opportunity__c =: i.Opportunity__c LIMIT 1000];

Date start = i.Start_Date__c;

Date first = [url removed, login to view]();

for(Invoice__c v : invoices){

if ([url removed, login to view](x*3) == v.Date_Sent__c){

l.Invoice__c = [url removed, login to view];

}

}

if (l.Invoice__c == null){

Invoice__c voice = new Invoice__c( Opportunity__c = i.Opportunity__c, Date_Sent__c = [url removed, login to view](x*3) );

insert voice;

l.Invoice__c = [url removed, login to view];

}

[url removed, login to view](l);

}

//save the invoice lines

insert lines;

}

}

*********** ONCLICK JAVASCRIPT (RUN FROM OBJECT DETAIL PAGE)**********

{!REQUIRESCRIPT("/soap/ajax/15.0/[url removed, login to view]")}

{!REQUIRESCRIPT("/soap/ajax/15.0/[url removed, login to view]")}

[url removed, login to view]("[url removed, login to view]","CreateLines", {id:"{![url removed, login to view]}"});

[url removed, login to view]();

Skills: Salesforce.com

See more: execute javascript button click salesforce, salesforce onclick javascript, addmonths salesforce, java apex salesforce, invoice apex class javascript button salesforce, static salesforce, salesforce javascript button, salesforce developer work, salesforce developer 1, production line, l com, java developer help, it works global, it java developer, interview java developer, interview for java developer, i need a salesforce developer, i need a java developer to help me, i need a java developer, developer org, com works, apex custom settings, apex addmonths, salesforce onclick java apex, salesforce java onclick

About the Employer:
( 5 reviews ) San Francisco, United States

Project ID: #1054367

2 freelancers are bidding on average $175 for this job

dskvaptech

Our technical people can handle [url removed, login to view] projects in a best way to provide flexible solutions at each level of usage of the system. We have experienced people who dealt lump sum(More than 50) of [url removed, login to view] pr More

$200 USD in 5 days
(1 Review)
3.0
deb012801

I would like to bid for this. I will try finish in 5 days. Payment after delivery. Thanks Mita

$150 USD in 3 days
(0 Reviews)
0.0