Asif Huddani
Asif Huddani

Reputation: 1

Delete Button Trigger not work - dexterity Dynamics GP

I am looking on Microsoft Dynamics Customization and create trigger on Purchase Transaction Entry Form.

When i click on delete trigger wont execute because GP ask message "Are you sure you want to delete this record"

Here is cde snippets

local integer l_result;

local string strMnuAddDocs = "PaperSave - Add Documents";

local string strMnuShowDocs = "PaperSave - Show Documents";

warning "Startup_PM_Transaction_Entry Called";

l_result = Trigger_RegisterFocus(anonymous('Delete Button' of window PM_Transaction_Entry of form PM_Transaction_Entry), TRIGGER_FOCUS_CHANGE, TRIGGER_BEFORE_ORIGINAL, script PPSTrigger_PM_Transaction_Entry_Delete);

if l_result <> SY_NOERR then

warning "Focus trigger registration on PM_Transaction_Inquiry failed.";

end if;

Can any one has idea how i can use this ?

Upvotes: 0

Views: 641

Answers (1)

Almas Mahfooz
Almas Mahfooz

Reputation: 1086

You haven't post the code of PPSTrigger_PM_Transaction_Entry_Delete. the error is coming because of the code on it. and just for your info you have used the wrong trigger, you are delete even before gp delete initiated. what if user change his mind press cancel button and don not delete the record? record in your table or whatever you are trying to do on delete button will already be done. Use DB trigger instead.

elmo

Upvotes: 0

Related Questions