1 Reply Latest reply: Aug 11, 2011 10:57 PM by 787567 RSS

    update close reason in AS_OPPORTUNITY_PUB.Update_Opp_Header is not happenin

    787567
      When i try to call api AS_OPPORTUNITY_PUB.Update_Opp_Header and update close_reason to 'BUYING DEFERRED'' it is not happening. tried all status, it is happening only ig i give close_reason as 'WON'

      <code>
      headerRec.lead_id := leadId;
      --headerRec.status :='WON';
      --headerRec.status_code :='WON';
      headerRec.owner_salesforce_id := resourceid;
      headerRec.owner_sales_group_id :=salesGroupid;
      headerRec.status :='Dropped';
      headerRec.status_code :='Dropped';
      headerRec.close_reason:='BUYING DEFERRED';
      headerRec.last_update_date := lastUpdatedDate;
      headerRec.last_updated_by := FND_GLOBAL.USER_ID;
      -- dbms_output.put_line (headerRec.last_update_date );
      AS_OPPORTUNITY_PUB.Update_Opp_Header(p_api_version_number => '2.0',
      p_commit => fnd_api.G_FALSE,
      p_header_rec => headerRec,
      p_check_access_flag => 'Y',
      p_admin_flag => 'N',
      p_admin_group_id => null,
      p_identity_salesforce_id => resourceid,
      p_partner_cont_party_id => null,
      x_return_status => x_return_status,
      x_msg_count => x_msg_count,
      x_msg_data => x_msg_data,
      x_lead_id => x_lead_id);
      DBMS_OUTPUT.put_line('--' || x_return_status);
      IF (x_return_status != 'S') THEN
      IF (fnd_msg_pub.count_msg > 0) THEN
      FOR i IN 1 .. fnd_msg_pub.count_msg LOOP
      fnd_msg_pub.get(p_msg_index => i,
      p_encoded => 'F',
      p_data => x_msg_data,
      p_msg_index_out => x_msg_count);
      DBMS_OUTPUT.put_line(x_msg_data);
      END LOOP;

      </code>