Monday, March 29, 2010

Update Null to attributes in hz_party_v2pub.update_organization

I am calling API hz_party_v2pub.update_organization to update party information.
I am fetching the already existing organization record and updating it.

orgrec hz_party_v2pub.organization_rec_type;
hz_party_v2pub.get_organization_rec (p_party_id => partyid,
x_organization_rec => orgrec,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data
);
orgrec.party_rec.attribute4:=null;

The Current Value of attribute4 is 12
When i am trying to update the attribute4 to null through api, I am
getting the old value 12 getting retained. But when i update other value like 13,
it is working. It does not update null alone. After doing R&D I came to find that
the following will solve the problem.

orgrec.party_rec.attribute4 := chr(0);

Now it is updating the value to null.

No comments: