Attaching a Billing Schedule to a Project

In some cases, you may want to attach a billing schedule to a project record.

The type of billing schedule you choose must match the project record’s billingType body field. If you try to attach a different type of billing schedule, the system generates an error. For this reason, you may want to specify the billing type as part of the same update operation that attaches the schedule to the project record.

If you used SOAP web services to create a fixed bid milestone billing schedule, you may recall that you were required to specify a project record as part of the add operation. However, the billing schedule was not automatically applied to the project record as part of the add operation. You must manually attach the schedule to the project record. If the billing schedule references milestone task records associated with a particular project, the schedule can be attached only to that project.

For more information on working with billing schedules in conjunction with projects, see Project Billing.

C#

          private void attachScheduleToProject()
{

   // Define the project to which you want to 
   // attach the billing schedule.
            
   Job updatedProject = new Job();
   updatedProject.internalId = "1461";


   // To avoid a potential mismatch with the billing
   // type field, you may want to actively set it to 
   // the desired type.

   updatedProject.jobBillingType = JobBillingType._fixedBidMilestone;
   updatedProject.jobBillingTypeSpecified = true;


   // Identify the billing schedule. 

   RecordRef myBillingSchedule = new RecordRef();
   myBillingSchedule.type = RecordType.billingSchedule;
   myBillingSchedule.typeSpecified = true;
   myBillingSchedule.internalId = "34";


   // Update the project record so that it uses
   // this billing schedule.

   updatedProject.billingSchedule = myBillingSchedule;


   // Execute the update operation.

   _service.update(updatedProject);

} 

        

SOAP Request

          <soap:Body>
   <update xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
      <record xmlns:q1="urn:relationships_2017_1.lists.webservices.netsuite.com" xsi:type="q1:Job" internalId="1461">
         <q1:jobBillingType>_fixedBidMilestone</q1:jobBillingType>
         <q1:billingSchedule internalId="34" type="billingSchedule" />
      </record>
   </update>
</soap:Body> 

        

SOAP Response

          <soapenv:Body>
   <updateResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
      <writeResponse>
         <platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
         <baseRef internalId="1461" type="job" xsi:type="platformCore:RecordRef" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
      </writeResponse>
   </updateResponse>
</soapenv:Body> 

        

Related Topics

Billing Schedule
Billing Schedule Types
Billing Schedule Body Fields and Sublist Fields
Billing Schedule Supported Operations
Billing Schedule Code Samples
update
SuiteTalk SOAP Web Services Platform Overview
Advanced Billing Overview
Enabling Advanced Billing
Applying Billing Schedules

General Notices