1.Give an welcome message when opening the standard Customer form. if (event_name = 'WHEN-NEW-FORM-INSTANCE' and form_name = 'AA_CUSTOMER_ADDRESS') then
if (block_name = 'HZ_PARTIES') then
FND_MESSAGE.SET_STRING('WELCOME');
FND_MESSAGE.SHOW;
end if;
if (block_name = 'HZ_PARTIES') then
FND_MESSAGE.SET_STRING('WELCOME');
FND_MESSAGE.SHOW;
end if;
2. Display the alert when user create the new customer with existing name and should not be allowed to save.ElsIf (event_name = 'WHEN-NEW-ITEM-INSTANCE') then
if (form_name = 'AA_CUSTOMER_CREATION_TEMP' and block_name ='HZ_PARTIES')then
if(name_in('system.record_status')='INSERT') then
begin
l_party_name :=name_in('HZ_PARTIES.PARTY_NAME');
if l_party_name is not null then
select party_name into name1 from hz_parties where party_name like l_party_name ;
IF name1 IS NOT NULL THEN
alert_button := Show_Alert('CUSTOMER_NAME');
IF alert_button = ALERT_BUTTON1 THEN
go_item('HZ_PARTIES.PARTY_NAME') ;
end if;
end if;
end if;
end;
end if;
end if;
if (form_name = 'AA_CUSTOMER_CREATION_TEMP' and block_name ='HZ_PARTIES')then
if(name_in('system.record_status')='INSERT') then
begin
l_party_name :=name_in('HZ_PARTIES.PARTY_NAME');
if l_party_name is not null then
select party_name into name1 from hz_parties where party_name like l_party_name ;
IF name1 IS NOT NULL THEN
alert_button := Show_Alert('CUSTOMER_NAME');
IF alert_button = ALERT_BUTTON1 THEN
go_item('HZ_PARTIES.PARTY_NAME') ;
end if;
end if;
end if;
end;
end if;
end if;
3. Enable zoom button for sales order form when user is in Main Tab.(In zoom_available procedure of custom.pll) begin
if (form_name = 'OEXOEORD' and block_name = 'ORDER') then
return TRUE;
else
return FALSE;
end if;
end zoom_available;
4. When user selects the customer field and click on the zoom button it should open the customer details block.
(we should define parameter as CUSTOMER_NAME in the the form same as the name given here in the code )Elsif(event_name = 'ZOOM') then
if ((form_name = 'OEXOEORD' and block_name = 'ORDER')) then
param_to_pass1 := name_in('ORDER.SOLD_TO');
fnd_function.execute
(FUNCTION_NAME=>'CUSTOMER_INFORMATION_FUNC',
OPEN_FLAG=>'Y',
SESSION_FLAG=>'Y',
OTHER_PARAMS=>'CUSTOMER_NAME="'||param_to_pass1||'"'
);
end if;
5.Change the Lov of the Customer field of Sales order form to display the customers who are having the bill to and ship to address.Elsif (event_name = 'WHEN-NEW-FORM-INSTANCE' and form_name = 'AA_CUSTOMER_CREATION_TEMP')then
r:=find_group('cust_name');
if not id_null(r) then
delete_group('cust_name');
end if;
message('lov1');
r:=create_group_from_query(grp_name,'select party_name from hz_parties where party_id>50000');
errcode := POPULATE_GROUP_WITH_QUERY( r,'select party_name from hz_parties where party_id>50000');
if(errcode<>0)
then message('error');
end if;
message('lov4');
set_lov_property('CUSTOMER_NAME',group_name,r);
message('lov5');
end if;
end if;
end event;
(we should define parameter as CUSTOMER_NAME in the the form same as the name given here in the code )Elsif(event_name = 'ZOOM') then
if ((form_name = 'OEXOEORD' and block_name = 'ORDER')) then
param_to_pass1 := name_in('ORDER.SOLD_TO');
fnd_function.execute
(FUNCTION_NAME=>'CUSTOMER_INFORMATION_FUNC',
OPEN_FLAG=>'Y',
SESSION_FLAG=>'Y',
OTHER_PARAMS=>'CUSTOMER_NAME="'||param_to_pass1||'"'
);
end if;
5.Change the Lov of the Customer field of Sales order form to display the customers who are having the bill to and ship to address.Elsif (event_name = 'WHEN-NEW-FORM-INSTANCE' and form_name = 'AA_CUSTOMER_CREATION_TEMP')then
r:=find_group('cust_name');
if not id_null(r) then
delete_group('cust_name');
end if;
message('lov1');
r:=create_group_from_query(grp_name,'select party_name from hz_parties where party_id>50000');
errcode := POPULATE_GROUP_WITH_QUERY( r,'select party_name from hz_parties where party_id>50000');
if(errcode<>0)
then message('error');
end if;
message('lov4');
set_lov_property('CUSTOMER_NAME',group_name,r);
message('lov5');
end if;
end if;
end event;
1 comment:
Your article is very pivotal!Order Forms
Post a Comment